0

ZK + JSF

asked 2008-10-03 17:40:32 +0800

erickmelo gravatar image erickmelo
87 2

updated 2008-10-03 17:48:31 +0800

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

delete flag offensive retag edit

1 Reply

Sort by » oldest newest

answered 2008-10-08 00:47:28 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

updated 2008-10-08 00:48:21 +0800

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2008-10-03 17:40:32 +0800

Seen: 254 times

Last updated: Oct 08 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More