-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi ;
may be, can some body help.
I have a tree, when click on A tree node, in Spring Backing Bean i set the selectedNode through an onClick event.
The data in the center layout is in Tabbox and it will not be refreshed.
when creating the Tree,selectedNode is null and the textbox is clear in tabbox, after Click on a Tree Node selectedNode is not null.
aber getSselectedNode in schemaTreeComposer will not be more asked to refresh data and Textboxt still clear.
How can I refresh data in Tabbox after click on a Tree Node?
hier is apiece of my code
schemaTreeComposer is in ApplicationContext.xml as Spring Backing Bean
ApplicationContext.xml:
<bean id="schemaTreeComposer" class="de.volkswagen.mbproduct.web.backing.tree.dynamic_tree.SchemaTreeComposer" scope="desktop"/>
myZul file
<window id="propertyWindow" apply="${schemaTreeComposer}"> <style> .hightlight { color: #1469AB; font-weight: bold; } .leftAlign { margin-left: 20px; margin-right: auto; } </style> <grid fixedLayout="true" id="propertyView" visible="@{schemaTreeComposer.currentNode != null}"> <rows> <row sclass="leftAlign" height="30px"> <label style="text-align: left" value="Name" width="70px" sclass="leftAlign"/> <hlayout style="text-align: left"> <textbox id="name" value="${schemaTreeComposer.selectedNode.name}" width="150px" tabbable="true" /> </hlayout> </row> </rows> </grid> </window>
thanks
${...} is evaluated ONCE only when the page is loaded. If you would like the value in textbox to be updated automatically, I would suggest using MVVM in ZK6.
http://books.zkoss.org/wiki/Small_Talks/2011/November/MVVM_in_ZK_6_-_Design_CRUD_page_by_MVVM_pattern
Though this example is not talking about a tree but the idea is similar. User select from a listbox the current item and show on the textbox the details of that item.
Asked: 2012-02-17 07:13:10 +0800
Seen: 353 times
Last updated: Feb 23 '12