5 Replies Latest reply on Nov 11, 2010 4:28 AM by romyo0o

    Richfaces scrollabe Datatable with colspan

    muneeswaranbalu

      Hi to all,

       

               I have a scrollabe data table which has a column named as Name,This column contains two sub columns firstname,last name.I wants to set first name and last name under the name column by using colspan in richfaces column.But,If i use colspan scrollabe datatable not working perfectly.How can i achieve that?By using rich:datatable i can achieve that.

      Thanks in advance.

        • 1. Re: Richfaces scrollabe Datatable with colspan
          ilya_shaikovsky

          It's limitation of scrollable table. we can't support spanning there because of scrolling and resizing features.

          • 2. Re: Richfaces scrollabe Datatable with colspan
            muneeswaranbalu

            Hi Ilya,

             

                       Thanks for your reply.I wants to set the scroll for the table which has the spanning.How can i achieve this?Is there any other way or component for achieve this?Please guide me.

            Thanks in advance.

            • 3. Re: Richfaces scrollabe Datatable with colspan
              ilya_shaikovsky

              in general you could use two tables one to display header and second for data. second could be wrapped to scrollable container. in that case - you could have any spanning inside second. But you have to synchronize width's of header and data columns on your own (by fixing in px) and probably will need to solve some problems like "scroll position getting lost after rerender"

              • 4. Re: Richfaces scrollabe Datatable with colspan
                muneeswaranbalu

                Hi ilya,

                 

                         Thanks for your reply.But i feel the solution is not optimum.Because it puts lot of burden on developer's shoulder.Is there any other solution for this?

                Thanks in advance.

                • 5. Re: Richfaces scrollabe Datatable with colspan
                  romyo0o

                  u can try something like that:

                   

                   

                   

                   

                  <h:panelGrid id="currentPanel">

                  <rich:scrollableDataTable width="290px" height="100px"

                   

                  id="DataTable" selection="#{ManagedBean.selection}"

                   

                  value="#{ManagedBean.Bean.currentList}"

                   

                  var="current"

                   

                  binding="#{ManagedBean.currentTable}"

                  >

                   

                   

                  <f:facet name="header">

                   

                  <h:outputLabel value="Current "

                   

                  style="padding-left: 80px; padding-right: 87px; border-bottom: 2px white solid;color: white; background-color: #5985bf;font:'verdana';font-size: 12px;font-weight: bold;"></h:outputLabel>

                   

                  </f:facet>

                   

                   

                  <rich:column width="130px" sortable="false">

                   

                  <f:facet name="header">

                   

                  <h:outputText value="Id" styleClass="headerLabel" />

                   

                  </f:facet>

                   

                  <h:outputText id="idTxt" value="#{current.Id}" />

                   

                  </rich:column>

                   

                   

                  <rich:column width="145px" sortable="false">

                   

                  <f:facet name="header">

                   

                  <h:outputText value="Name" styleClass="headerLabel"/>

                   

                  </f:facet>

                   

                   

                  <h:outputText id="valueTxt"

                   

                  value="#{current.Name}" />

                   

                  </rich:column>

                   

                   

                  </rich:scrollableDataTable>

                  </h:panelGrid>