I've got an appointment so I quickly wrote down what I've done:
1. Download selectitems.jar and selectitems-ui.jar.
2. Place them in WEB-INF/lib of your war file.
3. Add following property to your persistence.xml:
<property name="jboss.entity.manager.factory.jndi.name"
value="java:/selectItemsEntityManagerFactory"/>
4. Add following entry to your components.xml:
<component class="org.jboss.seam.selectitems.SelectItemsConfig">
| <property
name="persistenceUnitJndiName">java:/selectItemsEntityManagerFactory</property>
| </component>
As you might guess the property has to be the same value you set in
persistence.xml.
5. Now you can establish the relationships between your entities using
@OneToOne and so on. (Don't forget to adjust getters and setters)
6. The method which outjected the SelectItems can now be rewritten to outject
an list containing the entities.
7. Use <si:selectItems> to retrive the entities. With attribute "label" you can
define the label shown on each row.
To use si you have to include
xmlns:si="http://jboss.com/products/seam/selectitems/taglib" and
xmlns:s="http://jboss.com/products/seam/taglib"
You have to use attributes Value, var and label.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988182#3988182
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988182
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user