-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I'm on zk 8.0.1 and trying to set the "closable" property of Groupbox to false for all groupbox elements in code.
I have in zk.xml:
<language-config> <addon-uri>/WEB-INF/lang-addon.xml</addon-uri> </language-config>
And in lang-addon.xml:
<component> <component-name>groupbox</component-name> <extends>groupbox</extends> <property> <property-name>closable</property-name> <property-value>false</property-value> </property> </component>
However, this isn't working and I'm guessing it's because I'm creating my Groupbox object's myself in a controller so no ZUL file processing is being done.
Is there any way I can get this property set on java objects automatically?
What does the language-name tag do?
<language-name>xul/html</language-name>
Hello tisaksen,
You should change the new component name from groupbox to groupbox-new (possible name conflict).
Also since you are creating it from java code, you could use the extended class for which in it's constructor you would set the property value.
Best Regards,
Darksu
Hi,
Thanks! Actually, it is working just fine in a test zul file, but not in Java code. But as you suggest, it's simply a matter of creating a subclass which sets and replacing the Groupbox objects. The reason I wanted to do this "globally" is that I have quite a lot of groupboxes in use so I didn't really want to find them all and setClosable(false) on each one. On the other hand, I really should convert my stuff to zul files (upgrading from 3.6 to 8.0 (!))
Asked: 2016-04-26 13:51:25 +0800
Seen: 33 times
Last updated: Apr 27 '16
Groupbox 3d mold with caption toolbar
GroupBox Caption Doesnt Show Up
images redrawing after collection change
Groupbox content not loaded into Dom when the box is closed by default
Insert New Record at the top of Grid / Listbox using Inline Editing
Multiple row save in form MVVM