This content has been marked as final.
Show 2 replies
-
1. Re: Standard task : lookup field
swd847 Oct 9, 2007 8:49 AM (in response to dkane)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. -
2. Re: Standard task : lookup field
dkane Oct 9, 2007 9:39 AM (in response to dkane)Thank you very much. Got it working.