3 Replies Latest reply on Feb 4, 2009 11:04 AM by Dongyao Zhao

    scrollableDataTable can not be scrollabled in rich:tabPanel

    Dongyao Zhao Novice

      The scrollbar is disabled. You must resize of the columns, then enable the scrollbar.

      i use richfaces 3.2.0-SR1.

       <a4j:outputPanel styleClass="tBox">
       <rich:tabPanel switchType="ajax" contentClass="taskBody" >
       <rich:tab>
       <f:facet name="label">
       <h:panelGrid columns="5" cellpadding="0" cellspacing="0">
       <h:outputText value="Tasks" />
      
       </h:panelGrid>
       </f:facet>
       <a4j:outputPanel layout="block">
      
       <ui:insert name="TaskTablePane" />
      
       </a4j:outputPanel>
       </rich:tab>
       </a4j:outputPanel>
      
      

      TaskTablePane.xhtml
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:dim="http://dimetis.de/jsf">
       <a4j:keepAlive beanName="OperationOfTask"/>
      
       <h:form>
      
      <rich:scrollableDataTable id="taskTablePaneId"
       height="#{layoutBean.standardHeight}"
       width="#{layoutBean.standardWidth}"
       value="#{appData.tasks}" var="task"
       rowClasses="taskRows" columnClasses="taskColumns"
       rowKeyVar="rkv" frozenColCount="1" rows="20"
       onRowDblClick="temporarySelectedTaskId=#{task.id}; selectedUpdateTask(temporarySelectedTaskId);">
      
       <rich:column sortable="false" width="118">
       <f:facet name="header" >
       <h:outputText value="Name" />
       </f:facet>
       <h:outputText value="#{task.name}" />
       </rich:column>
      
       <rich:column sortable="false" width="118">
       <f:facet name="header" >
       <h:outputText value="Category" />
       </f:facet>
       <h:outputText value="#{task.action}" />
       </rich:column>
      
       <rich:column sortable="false">
       <f:facet name="header">
       <h:outputText value="Source"/>
       </f:facet>
       <h:outputText value="#{task.taskDetails.source}"/>
       </rich:column>
      
       <rich:column sortable="false">
       <f:facet name="header">
       <h:outputText value="Sink"/>
       </f:facet>
       <h:outputText value="#{task.taskDetails.sinkCompressed}" title="#{task.taskDetails.sinkCompressed}"/>
       </rich:column>
      
       <rich:column sortable="false">
       <f:facet name="header">
       <h:outputText value="Details"/>
       </f:facet>
       <h:outputText value="#{task.taskDetails.taskDetailsToString}" title="#{task.taskDetails.taskDetailsToString}"/>
       </rich:column>
      
       <rich:column sortable="false">
       <f:facet name="header">
       <h:outputText value="Server Status"/>
       </f:facet>
       <h:outputText value="#{task.serverStatus}" />
       </rich:column>
      
       <rich:componentControl id="taskcontrolid" for="tContextMenu" operation="show"/>
       </rich:scrollableDataTable>
      
       </a4j:outputPanel>
       </h:form>
      </ui:composition>
      
      


        • 1. Re: scrollableDataTable can not be scrollabled in rich:tabPa
          Dongyao Zhao Novice

          I have tried with richfaces 3.3.0 GA, but it dosen't work. I think that the problem is by my code. The SDT is covered with panels, but i didn't find out the error. Anybody had ideas? Thanks in advance.

          • 2. Re: scrollableDataTable can not be scrollabled in rich:tabPa
            Tsikhon Kuprevich Newbie

            Hi, I see it working at my env.

            I'm using:
            jsp
            myfaces 1.2.5
            tomcat 6
            RichFcaes 3.3.0.GA

            Here is my sample page code:

            
            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
            <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
            <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
            
            <html>
            <head>
            <title>myFaces_1.2.5 with jsp</title>
            </head>
            <body>
            <f:view>
             <h:form>
             <h:outputText value="Ajax Status: "></h:outputText>
             <a4j:status startText="Process..." stopText="Done."></a4j:status>
            
             <rich:tabPanel switchType="ajax" contentClass="taskBody">
             <rich:tab>
             <f:facet name="label">
             <h:panelGrid columns="5" cellpadding="0" cellspacing="0">
             <h:outputText value="Tasks" />
            
             </h:panelGrid>
             </f:facet>
             <a4j:outputPanel layout="block">
            
             <rich:scrollableDataTable value="#{testClass.catsArmy}" var="army"
             rows="15" height="280" width="500">
             <rich:column>
             <f:facet name="header">
             <h:outputText value="name"></h:outputText>
             </f:facet>
             <h:outputText value="#{army.name}"></h:outputText>
             </rich:column>
            
             <rich:column>
             <f:facet name="header">
             <h:outputText value="level"></h:outputText>
             </f:facet>
             <h:outputText value="#{army.level}"></h:outputText>
             </rich:column>
            
             <rich:column>
             <f:facet name="header">
             <h:outputText value="id"></h:outputText>
             </f:facet>
             <h:outputText value="#{army.id}"></h:outputText>
             </rich:column>
            
             <rich:column>
             <f:facet name="header">
             <h:outputText value="defence"></h:outputText>
             </f:facet>
             <h:outputText value="#{army.defence}"></h:outputText>
             </rich:column>
            
             <rich:column>
             <f:facet name="header">
             <h:outputText value="attack"></h:outputText>
             </f:facet>
             <h:outputText value="#{army.attack}"></h:outputText>
             </rich:column>
             </rich:scrollableDataTable>
            
             </a4j:outputPanel>
             </rich:tab>
             </rich:tabPanel>
             </h:form>
            </f:view>
            </body>
            </html>
            
            


            What env do you use?