[jboss-user] [JBoss Seam] - s:selectItems, entity-query, convertEntity stop working
sztank
do-not-reply at jboss.com
Thu Nov 8 15:18:04 EST 2007
Hello,
When I migrate from seam 1.2 to 2.0 the following code stops to work properly:
View:
| ..
| <s:decorate id="clientDecorate" template="layout/edit.xhtml">
| <ui:define name="label">Client:</ui:define>
| <h:selectOneMenu value="#{contract.client}" required="true">
| <s:selectItems value="#{clients.resultList}" var="c" label="#{c.name}" noSelectionLabel="Not defined"/>
| <s:convertEntity />
| </h:selectOneMenu>
| </s:decorate>
| ..
|
where "clients" is the entity-query defined in components.xml file:
| <framework:entity-query name="clients" ejbql="select b from Client b" />
|
"contract" is the entity bean.
That work perfectly in seam 1.2. In seam 2.0 it behaves this way:
When the view is rendered the selectOneMenu is always set to "Not defined" even when the contract.client field is set. So for example when I filled the form and select some "client" from selectOneMenu and then post the form the proper value is set to contract.client field. I persist the contract entity to the database. Now when the enother (edit) form is displayed with the contract.client set the label is "Not defined"
I have read some posts that deal with s:selectItems migration problems but still can't solve the problem.
Thanks in advance for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103081#4103081
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103081
More information about the jboss-user
mailing list