So, let us say we want to do some things like this:
<label zclass="class1 class2 @load(vm.class)" />
How to do this in ZK?
the above code render zclass
as class1 class2 @load(vm.class)
. But we want to execute @load
?
To do this, i went with an AbstractViewModel that contains all those "technical" methods i would like to use in my Zul.
Then i make every of my Viewmodel extends this abstractViewModel
public class AbstractTechnicalViewModel {
/** @see java.text.MessageFormat#format(String, Object...) */
public String format(final String pPattern, final Object... pParams) {
return MessageFormat.format(pPattern, pParams);
}
/** @see org.apache.commons.lang.StringUtils#concatenate(Object[]) */
public String concat(final Object... pParams) {
return StringUtils.join(pParams);
}
}
And then in my zul
tooltiptext="${vm.format(labels.my.label, param1)}"
Regards
You can use
cat
-like methods from thecore
taglib to concatenate strings. Something like this:For more details on
core
methods see here