[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1007) seam-gen integrated with entityConverter to implement foreign-key constraints with selectList

Jeffrey Constantin (JIRA) jira-events at lists.jboss.org
Thu Mar 8 05:18:30 EST 2007


seam-gen integrated with entityConverter to implement foreign-key constraints with selectList
---------------------------------------------------------------------------------------------

                 Key: JBSEAM-1007
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1007
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Tools
            Reporter: Jeffrey Constantin
            Priority: Optional


Have seam-gen "optionally" generate selectlist (<h:selectOneMenu>) tags in generated application based on foreign-key constraints in the data model -OR- user-entered meta data (like data-type mapping in Eclipse IDE).

Given a data model with foreign-key constraints enabled, seam-gen could recognize the relationship and automatically build the proper tags as explained in the SeamEntityConverter page ("http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEntityConverter")

COPIED FROM SeamEntityConverter PAGE:
--------------------------------------------------------------------------
If you create or edit the record of an employee, you want to set the department. This list of available departments has to be fetched from the database. You can do this by defining a query object in components.xml:

<framework:entity-query name="departments" ejbql="select d from Department d" />

Now you can use the seam component "departments" with the s:selectitems tag:

<h:selectOneMenu value="#{employee.department}">
   <s:selectItems value="#{departments.resultList}" var="department" label="#{department.name}"/>
   <ec:convertEntity />
</h:selectOneMenu >
---------------------------------------------------------------


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list