-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys.
I have a concrete question about composer autowiring based on the given explanation in this page: http://books.zkoss.org/wiki/ZK_Component_Reference/Common_Operations/Event_Handling/Event_Listening#Composer_and_Event_Listener_Autowiring
I have a Listbox:
<window id="win" width="1930px" apply="${MyBean}"> <listbox id="generalList" model="@{win$composer.gralListModel, load-after='btnAdd.onClick,btnDelete.onClick'}"> ... ... </listbox> </window>
where listBox ID is "generalList", right?. I want to do something when listbox is created, so I used the following:
<listbox id="generalList" model="@{win$composer.gralListModel, load-after='btnAdd.onClick,btnDelete.onClick'}"> <attribute name="onCreate"><![CDATA[ ... do something ]]></attribute> </listbox>
Based on performance tips, the previous example will be interpreted as ZSCRIPT (am I right?)... so I tried to use the autowiring feature like the following:
MyBean.java
public class MyBean extends GenericForwardComposer{ public void onCreate$generalList() { //do something... } }
But it didn't work, the listbox is loaded on screen and never enters to this method... am I missing something or the autowiring feature only works for specific methods?
Thanks for any help.
Regards.
Asked: 2011-11-04 13:20:45 +0800
Seen: 198 times
Last updated: Nov 04 '11