-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have declared the format of doublebox throughout the application as in the lang-addon.xml as below:
<lang-addon> <component> <component-name>doublebox</component-name> <extends>doublebox</extends> <property> <property-name>format</property-name> <property-value>##,##,##,##0.00</property-value> </property> </component> </lang-addon>
Whenever I use doublebox in zul file, the format is set as appropriately. When some screens are designed in java code and included into the zul file using include tag. But, the doublebox created through java are not following the format specified in the lang-addon.xml. In java, I have setting the format for doublebox to work.
Does it only apply to doublebox used in zul files directly?
Presently, I need to have a constant in land-addon and also in a java class. Wherever am using Doublebox in java, I need to specify the format individually. Is there any other best options available?
Thanks.
Remember that if you're creating your own component from Java, you need to call applyProperties, so default properties will be applied.
"Notice that the properties won't be applied if a component is created manually (by zscript or by Java codes). If you still want them to be applied with the initialial properties, you could invoke the applyProperties method as follows."
http://docs.zkoss.org/wiki/Developer_reference_The_ZK_User_Interface_Markup_Language_Processing_Instructions_The_component_Directive
I hope that helped, regards
Diego
Asked: 2009-09-29 13:20:01 +0800
Seen: 197 times
Last updated: Oct 05 '09