-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
It seem when we check/uncheck to set column visibility in the grid auto menupopup the variable binded to the "visible" property is never updated.
boolean colNameVisible = true; ... <columns menupopup="auto"> <column visible="@{colNameVisible}"/> ...
I think there are no default-actions for databinding and visible. Try some load-when/save-when-actions.
/Robert
I mean the databinding with a boolean variable and the visible property is working when I use my own checkboxs to change the value (true/false) of the binded variable.
But if I use the checkbox in the auto menupopup ( menupopup="auto") of the grid to set wich column is visible or not visible there is no update on the binded variable value. So I can't use it elsewhere. I need it to save the user preferences and display only the selected column at each visit. And at the next visit load the preferences and set the columns visibility.
Since the grid auto menupopup don't update the variable binded to the visible property I used my own checkboxs instead. Its working now.
Regards,
>> when I use my own checkboxs to change the value (true/false) of the binded variable
From the lang-addon.xml (inside the zkplus.jar)
<component> <component-name>checkbox</component-name> <extends>checkbox</extends> - <annotation> <annotation-name>default-bind</annotation-name> <property-name>checked</property-name> - <attribute> <attribute-name>access</attribute-name> <attribute-value>both</attribute-value> </attribute> - <attribute> <attribute-name>save-when</attribute-name> <attribute-value>self.onCheck</attribute-value> </attribute> </annotation> </component>
There is a defaultbinding for checkboxes and a default save-when. For visible there is no default-binding. For this case (grid automenu) i could not find any event that is good for save-when...
Sometimes a manual binder.saveAll() or binder.saveComponent(...) before you need the data - could help.
/Robert
Asked: 2009-05-25 14:59:52 +0800
Seen: 283 times
Last updated: May 26 '09