| Menuitem is a JSF component implementation for
org.zkoss.zul.Menuitem .
This class also implements
javax.faces.component.ActionSource .
That means you can use action and actionListener features on this component.
To use those features, you must declare a namespace of "http://java.sun.com/jsf/core"
with a prefix (say 'f' in below example), add attribute of those feature with this namespace
(for example f:required="true")in you jsf page.
For more detail of ActionSource features of JSF, you can refer to http://java.sun.com/products/jsp/
Example of action :
<z:menuitem id="menu" label="submit" f:action="#{CommandBean.actionPerform}"/>
Example of actionListener :
<z:menuitem id="menu" label="submit" f:actionListener="#{CommandBean.onActionPerform}"/>
In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
For example,
<z:menuitem f_action="#{CommandBean.actionPerform}"/>
This component should be declared nested under
org.zkoss.jsf.zul.Page .
To know more ZK component features you can refer to http://www.zkoss.org/
author: Dennis.Chen |