You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Sergey Smirnov <si...@exadel.com> on 2005/07/13 01:58:33 UTC
[shale] [clay] Problem with updating model
I have got a problem with updating model when clay based component is used.
As a test case I have two pages. On the first page I ask for name. Then, on the second page, I print it.
When I have on the first page:
<h:form>
<h:inputText value="#{myuser.firstName}"/>
<h:commandButton value="Show It" action="outp"/>
</h:form>
Everything works properly. However, when I replace inputText with clay style:
<h:form>
<sh:clay jsfid="inputName" id="comp"/>
<h:commandButton value="Show It" action="outp"/>
</h:form>
It shows the init value from the bean, but does not update the bean when the changed value is submitted.
clay-config.xml has:
<component jsfid="inputName" extends="inputText" allowBody="false">
<attributes>
<set name="value" value="#{myuser.firstName}"/>
</attributes>
</component>
faces-config.xml has:
...
<managed-bean>
<managed-bean-name>myuser</managed-bean-name>
<managed-bean-class>demo.User</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>firstName</property-name>
<property-class>java.lang.String</property-class>
<value>John</value>
</managed-property>
</managed-bean>
...
Actually, I incorporated those test stuff inside the shale-use-case application (07/08/05 nightly build). So, the rest configuration is from the original shale-use-case environment.
Do I miss something important here?
--
Sergey