-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I need to set a value to a component using composer
<textbox maxlength="XXXXXX"/>
i need to set maxlength property from a static property in other class like this
public final class NotComposerClass
{
public final static int MAX_LENGTH_TO_SET=1000;
}
How can i set NotComposerClass.MAXLENGTHTO_SET value to the textbox without using the composer or without create a separated method in the composer is this possible?
thanks a lot. and best regards.
Hi Javiut,
In ZK 8, you can access the static members of any class in zul, as long as you import it first: https://www.zkoss.org/wiki/ZUMLReference/ZUML/ProcessingInstructions/import
the result would be something like:
<?import com.foo.NotComposerClass?>
...
<textbox maxlength="${NotComposerClass.MAX_LENGTH_TO_SET}"/>
Regards, MDuchemin
Asked: 2016-06-16 12:29:16 +0800
Seen: 13 times
Last updated: Jun 17 '16
wrong valueException come in front of modal popup [closed]
Use parameters in a conditional @command
Problems with multiple press and onCtrlKey
MVVM @save on the fly [closed]
Unable to activate destroyed desktop
org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException
How to put a image or Letter over image on a specific XY Coordinate