cara mengambil nama zul file dari composer

Nama zul yang diambil dari request URL akan digunakan untuk menentukan hak akses User terhadap halaman zul tersebut.

q> Buat file zul

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="win" title="new page title" border="normal">
<label value="You are using: ${desktop.webApp.version}"/>
<label value="You are access: ${desktop.requestPath}"/>

</window>
</zk>

q> Buat composer

@Override
public void doAfterCompose(Component comp) throws Exception {
// TODO Auto-generated method stub
super.doAfterCompose(comp);
System.out.println("Anda sedang mengakses :: "+win.getDesktop().getRequestPath());
createMenu();

}

q> Jadi bisa lewat zul file dan juga bisa lewat composer.

sumber::
http://www.zkoss.org/forum/listComment/13366

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s