[jboss-user] [JBoss Seam] - Re: Standard task : lookup field
swd847
do-not-reply at jboss.com
Tue Oct 9 08:49:37 EDT 2007
Something like:
|
| <rich:datatable value="#{datamodel}" var="var">
| <rich:column>
| <f:facet name="header">Category</f:facet>
| <h:selectOneMenu value="#{var.category_id}" converter="#{converters.myConverter}" />
| <s:selectItems value="#{categoryList}" var="cat" label="#{cat.name}"/>
| </h:selectOneMenu>
| </rich:column>
| </rich:datatable>
|
|
Most likely you will want to use <s:convertEntity/> rather that a custom converter, if however you actually want to set the category_id property explicitly (i.e. you are not using hibernate to map the one to many relationship) then you will need to write a converter to convert between the Category entity and it's id, look in the docs for an example.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092998#4092998
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092998
More information about the jboss-user
mailing list