-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys,
I'm with a problem when integrating Zk + JSF. I'm using JSF 1.1...
I found a smaltalk about this integration, but I did't get how to acess my Backing Bean.
http://www.zkoss.org/smalltalks/zuljsf/
<z:textbox id="tbox" f:value="#{ValueBindingBean.text}" /><br/>
It's working fine, but I need access a Backing Bean. Using Java code I get it:
<z:zscript>
var user = ContextUtil.getBean("userBean");
label.value = user.getName();
</z:zscript>
For simple components it works, but when I try bind a selection list, for example, I get problems...
<z:listbox id="lbox" f:value="#{ValueBindingBean.selection}">
<z:listitem value="A" label="Item-A" />
<z:listitem value="B" label="Item-B" />
<z:listitem value="C" label="Item-C" />
<z:listitem value="D" label="Item-D" />
<z:listitem value="E" label="Item-E" />
<z:listitem value="F" label="Item-F" />
</z:listbox>
The code above should set the selected items on my backing bean, but it doesn't work...
Is it possible? Bind the model, the selected items, ... to my backing bean? If true, how?
Currently I'm needing to do this using a Java code....
<z:zscript>
var user = ContextUtil.getBean("userBean");
label.value = user.getName();
</z:zscript>
[]s
Hi, for current version of ZK JSF Component, it can only binding 'get' from a backing bean, but it cannot binding 'set' to a backing bean.
This is implementation issue between ZK and JSF. For now, only submit page cause JSF binding but ajax event doesn't.
However you could post this 'binding' set to feature request, then we can track it.
Thanks.
Asked: 2008-10-03 17:40:32 +0800
Seen: 254 times
Last updated: Oct 08 '08