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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...