Well, if you have a SMPC (as is usually best), you could use a
| public List<Category> getAllCategoriesParentList() {
| return entityManager.createQuery("from Category").getResultList();
| }
|
(note, code from memory, not guaranteed to compile, but something like that)
and then just use a
| <h:selectOneMenu value="#{category.parentCategory}">
| <s:selectItems value="#{categoryController.allCategoriesParentList}"/>
| <s:convertEntity/>
| </h:select>
| [/code>
|
| and be sure to override equals() and hashCode() for your entity. And to
have a messages tag to catch validation errors.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121678#4121678
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121678
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user