0 Replies Latest reply on Jul 27, 2010 4:06 AM by Javaria Gull

    rich:dataTable with editable column

    Javaria Gull Newbie

      I am new to Seam.

      I am using rich:dataTable and want to add editable column "ordinal" and on a click of a button this data needs to be stored in database. My code is below. Having no clue how to handle it. Please help.




      <rich:dataTable id="tutorialList" styleClass="resultList" var="tutorial" value="#{tutorialList.resultList}" rows="10" rendered="#{not empty tutorialList.resultList}">
      <rich:column>
           <f:facet name="header">
                <s:link styleClass="columnHeader">
                     <span>ID</span><h:graphicImage rendered="#{tutorialList.order=='t.id asc'}" url="/images/arrow_up.gif" /><h:graphicImage rendered="#{tutorialList.order=='t.id desc'}" url="/images/arrow_down.gif" />
                     <f:param name="order" value="#{tutorialList.order=='t.id asc' ? 't.id desc' : 't.id asc'}"/>
                </s:link>
           </f:facet>
           <h:outputText value='#{tutorial.id}' />
      </rich:column>
      </rich:dataTable>
      <rich:column styleClass='wideColumn'>
           <f:facet name="header">
                <s:link styleClass="columnHeader">
                     <span>Name</span><h:graphicImage rendered="#{tutorialList.order=='name asc'}" url="/images/arrow_up.gif" /><h:graphicImage rendered="#{tutorialList.order=='name desc'}" url="/images/arrow_down.gif" />
                     <f:param name="order" value="#{tutorialList.order=='name asc' ? 'name desc' : 'name asc'}"/>
                </s:link>
           </f:facet>
           <h:outputText value='#{tutorial.name}' />
      </rich:column>
      <rich:column>
           <f:facet name="header">
                <s:link styleClass="columnHeader">
                     <span>Ordinal</span><h:graphicImage rendered="#{tutorialList.order=='t.ordinal asc'}" url="/images/arrow_up.gif" /><h:graphicImage rendered="#{tutorialList.order=='t.ordinal desc'}" url="/images/arrow_down.gif" />
                     <f:param name="ordinal" value="#{tutorialList.order=='t.ordinal asc' ? 't.ordinal desc' : 't.ordinal asc'}"/>
                </s:link>
           </f:facet>
           <h:inputText id="ordinal" value="#{tutorial.ordinal}" />
      </rich:column>||