-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
You can register the Labels.getLabel(String, String)
method in your zul file and access it like this:
assume you have a /WEB-INF/zk-label.properties containing the label property existing=existing value
<?xel-method prefix="my" name="labelDefault"
class="org.zkoss.util.resource.Labels"
signature="java.lang.String getLabel(java.lang.String, java.lang.String)"?>
<zk>
<window border="normal" title="hello">
<label value="${my:labelDefault('existing', 'default for existing')}"/>
<label value="${my:labelDefault('not.existing', 'default for not existing')}"/>
</window>
</zk>
the first label would output the label, the second one would fallback to the default given.
Robert
2 | No.2 Revision |
You can register the Labels.getLabel(String, String)
method in your zul file and access it like this:this (also check the documentation/ImportJavaMethods)):
assume you have a /WEB-INF/zk-label.properties containing the label property existing=existing value
<?xel-method prefix="my" name="labelDefault"
class="org.zkoss.util.resource.Labels"
signature="java.lang.String getLabel(java.lang.String, java.lang.String)"?>
<zk>
<window border="normal" title="hello">
<label value="${my:labelDefault('existing', 'default for existing')}"/>
<label value="${my:labelDefault('not.existing', 'default for not existing')}"/>
</window>
</zk>
the first label would output the label, the second one would fallback to the default given.
Robert
3 | No.3 Revision |
You can register the Labels.getLabel(String, String)
method in your zul file and access it like this (also check the documentation/ImportJavaMethods)):):
assume you have a /WEB-INF/zk-label.properties containing the label property existing=existing value
<?xel-method prefix="my" name="labelDefault"
class="org.zkoss.util.resource.Labels"
signature="java.lang.String getLabel(java.lang.String, java.lang.String)"?>
<zk>
<window border="normal" title="hello">
<label value="${my:labelDefault('existing', 'default for existing')}"/>
<label value="${my:labelDefault('not.existing', 'default for not existing')}"/>
</window>
</zk>
the first label would output the label, the second one would fallback to the default given.
Robert