myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharvan Bhatt (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (MYFACES-975) Data table Scroller not working the dataTable which was actually contained in other DataTable
Date Sat, 24 Dec 2005 07:18:30 GMT
Data table Scroller not working the dataTable which was actually contained in other DataTable
---------------------------------------------------------------------------------------------

         Key: MYFACES-975
         URL: http://issues.apache.org/jira/browse/MYFACES-975
     Project: MyFaces
        Type: Improvement
  Components: Tomahawk  
    Versions: 1.1.1    
 Environment: Window 2000 ( servicepack4 ) , JBuilderX , Tomcat 4.0 , using src ( myfaces-20051216-src
 )
    Reporter: Sharvan Bhatt
    Priority: Critical



I want to use the <t:dataScroller ... />  for Navigation in  <t:dataTable ... />

It works fine but I in my case navigable <t:dataScroller ... /> is actually contained
in <t:dataScroller ... />

Actual code
JSP
/***************************************************************************************************/
<%@ taglib uri="/taglib/h.tld" prefix="h"%>
<%@ taglib uri="/taglib/f.tld" prefix="f"%>
<%@ taglib uri="/taglib/t.tld" prefix="t"%>
<%--
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
--%>

<html>
<head>
<title>
componentCreationTest
</title>
</head>
<body bgcolor="#ffffff">
  <f:view >
    <h:messages>
    </h:messages>
    <h:message for="userGroup">
    </h:message>
    <t:dataTable id="userGroup" value="#{list.userGroup}"  var="userGroup">
      <t:column>
        <t:dataTable id="user" value="#{list.users}" var="data" rows="5" preserveDataModel="true">
          <h:column>
            <f:facet name="header">
              <h:outputLabel value="UserName">
              </h:outputLabel>
            </f:facet>
            <h:outputLabel value="#{data}">
            </h:outputLabel>
          </h:column>
          <f:facet name="footer">
            <t:dataScroller fastStep="5" styleClass="scrollerTable"
                  pageCountVar="pageCount"
                  pageIndexVar="pageIndex"
                  paginator="true"
                  paginatorMaxPages="12"
                  paginatorTableClass="paginator"
                  paginatorActiveColumnStyle="font-weight:bold;"
                  immediate="false"
                  for="user">
                <f:facet name="first" >
                  <t:graphicImage url="/images/arrow-first.gif" border="1" styleClass="objectList_GraphicImage"
/>
                </f:facet>
                <f:facet name="last">
                  <t:graphicImage url="/images/arrow-last.gif" border="1" styleClass="objectList_GraphicImage"
/>
                </f:facet>
                <f:facet name="previous">
                  <t:graphicImage url="/images/arrow-previous.gif" border="1" styleClass="objectList_GraphicImage"/>
                </f:facet>
                <f:facet name="next">
                  <t:graphicImage url="/images/arrow-next.gif" border="1" styleClass="objectList_GraphicImage"
/>
                </f:facet>
                <f:facet name="fastforward">
                  <t:graphicImage url="/images/arrow-ff.gif" border="1" styleClass="objectList_GraphicImage"/>
                </f:facet>
                <f:facet name="fastrewind">
                  <t:graphicImage url="/images/arrow-fr.gif" border="1" styleClass="objectList_GraphicImage"/>
                </f:facet>
            </t:dataScroller>
          </f:facet>
      </t:dataTable>

     </t:column>
    </t:dataTable>
  </f:view>
</body>
</html>

/***************************************************************************************************/


/***************************************************************************************************/
/***************************************************************************************************/
Corresponding Managed Bean Java Class code
/***************************************************************************************************/
/***************************************************************************************************/
package com.daffodilwoods.framework.tester;

import javax.faces.model.*;
import java.util.*;
import com.daffodilwoods.framework.test.User;
import javax.faces.model.DataModel;


public class SimpleUserList {
  private DataModel users;
  private DataModel userGroup;
  public SimpleUserList() {
  }

  public DataModel getUsers(){
    System.out.println("SimpleUserList.getUsers()");
    List list = new ArrayList();
    for (int i = 0; i < 100; i++) {
      list.add("test :: "+i);
    }
    return new ListDataModel(list);
  }


  public DataModel getUserGroup(){
    System.out.println("SimpleUserList.getUserGroup()");
    List userGroup = new ArrayList();
    for (int i = 0; i < 2; i++) {
      userGroup.add(getUsers());
    }
    return new ListDataModel(userGroup);
  }


}
/***************************************************************************************************/
/***************************************************************************************************/


/***************************************************************************************************/
Fonfig defination
/***************************************************************************************************/
  <managed-bean>
    <display-name>list</display-name>
    <managed-bean-name>list</managed-bean-name>
    <managed-bean-class>com.daffodilwoods.framework.tester.SimpleUserList</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>
/***************************************************************************************************/
/***************************************************************************************************/


/***************************************************************************************************/
Problem
/***************************************************************************************************/

1. Duplicate clientId facet first  (  I removed all the facet's from   <t:dataScroller
... /> )
     then it render properly ( i think so.. as it open )

2. When I click the Upper <t:dataScroller ... />  paginator links then it navigate all
the dataModel

 




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message