2 Replies Latest reply on May 13, 2009 2:46 AM by nimo22

    Adding scroll bar in the rich:dataTable

    sb.majumder

      Hi every body ,

      I am new in JSF , currently am working in a project & it is using JSF 1.1, richfaces 3.1.6,tomahawk 1.1.7.
      I have using one rich:dataTable in my xhtml file .

      My questions are :
      1) How can I add scroll bar on that table .
      2) I want to short the table by clinking on the column header .How is it possible ?

      Here is the code

      <rich:dataTable id="userTable"
       value="#{adminBacking.userModel}"
       var="item">
      
       <h:column >
       <f:facet name="header">
       <h:outputText value="Event ID" />
       </f:facet>
       <h:outputText value="#{item.event_id}" />
       </h:column>
      
       <h:column >
       <f:facet name="header">
       <h:outputText value="Event Name" />
       </f:facet>
       <h:outputText value="#{item.event_name}" />
       </h:column>
      
       <h:column >
       <f:facet name="header">
       <h:outputText value="First Name" />
       </f:facet>
       <h:outputText value="#{item.fname}" />
       </h:column>
      
       <h:column >
       <f:facet name="header">
       <h:outputText value="Last Name" />
       </f:facet>
       <h:outputText value="#{item.lname}" />
       </h:column>
      
       <h:column >
       <f:facet name="header">
       <h:outputText value="Email" />
       </f:facet>
       <h:outputText value="#{item.email}" />
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="Delete User" />
       </f:facet>
       <t:commandLink action="#{adminBacking.deleteApplication}" immediate="true"
       onclick="if (!confirm('Are you sure you want to DELETE this user ?')) return false" >
       <h:graphicImage value="/images/trashcan.jpg" style="border:none" width="20" height="20" alt="delete"/>
       </t:commandLink>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="Select Row" />
       </f:facet>
       <t:commandLink action="#{adminBacking.updateuserApplication}" value="Select"/>
       </h:column>
       </rich:dataTable>
      


      Thnaks & regards ,
      sb