1 Reply Latest reply on Mar 24, 2006 6:39 AM by truto

    java faces and seam

    cm49

      Hi,

      Being new to seam and javafaces I need some pointers, or an example of how would I go about having a table whose columns are dynamic and are drop downs (<h:selectOneMenu) EG:

      ______ ______ _______ ____
      |aaa \/||bbb \/ ||ddd \/| |Add|
      -------- --------- ----------
      bbc ccc eee
      zzz www rrr

      Hitting the add button would run an action class to insert the selected values in the drop downs.

      I am also not sure how to set the converters for each drop down.

      Any clues, examples appreaciated.
      Thanks,
      Chris.


        • 1. Re: java faces and seam
          truto

          The tomahawk faces library has examples on how to make tables with dynamic columns.

          For the selectOneMenu, you just need to bind it to a

          List<SelectItem> getxxxList()
          method.

          <h:selectOneMenu id="xxx" required="false" value="#{yourBean.xxx}">
           <f:selectItems value="#{yourBean.xxxList}"/>
          </h:selectOneMenu>