0

Does lang-addon.xml component extending only consider zul file components?

asked 2009-09-29 13:20:01 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

updated 2009-09-29 13:23:36 +0800

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.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-10-05 11:39:14 +0800

dpino gravatar image dpino
36

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-09-29 13:20:01 +0800

Seen: 197 times

Last updated: Oct 05 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More