webtier@glassfish.java.net

setPropertyActionListener doesn't work property in XHTML mode

From: <webtier_at_javadesktop.org>
Date: Sat, 10 Jan 2009 10:48:05 PST

While setPropertyActionListener works fine in jsp mode, it doesn't really work in XHTML (facelets) mode.

<h:inputText value="#{name.fname}" id="fname"/>

<h:commandButton value="Change with set listeners">
    <f:setPropertyActionListener target="#{name.fname}" value="Jialiang"/>
</h:commandButton>

When I press the command button, the value I should get in the input text box is "Jialiang". However, what I got is some sort of string expression:

/index.xhtml @26,75 value="Jialiang": ValueExpression[Jialiang]

In JSP mode, I can get the value correctly; this only happens in XHTML mode.
[Message sent by forum member 'cain_templar' (cain_templar)]

http://forums.java.net/jive/thread.jspa?messageID=325165