can you give this a try: code.google.com/p/facesgoodies
that has a small demo of what you want On 10/15/07, Gerard J. Moubarak <[EMAIL PROTECTED]> wrote: > > > > > Hi Guys, > > Well I wrote just a small example to test he pagination of table component > in Trinidad and it seems that even this one doesn't work. > > Can someone please tell me where did I go wrong? > > I used a simple configuration for the Trinidad config file and the faces > config file contains only the renderer along with the TestBean definition. > > As for the web.xml I tried the configuration mentioned on the web site > didn't work so I brought few extra stuff from the Trinidad examples, and > still hadn't worked. > > When I run the page http://localhost:8080/test/test.faces > The result is just a table with 3 columns, and it shows on the top the > "Previous 2" and "Next 3" put if I press on any nothing will happen > > As if the AJAX is not working. > > > > Thanks for your help. > > G > > -----TestBean---- > > > > package test; > > import java.util.ArrayList; > > import java.util.List; > > public class TestBean { > > private ArrayList<String> testList; > > public List<String> getTestList(){ > > if(testList==null){ > > testList=new ArrayList<String>(); > > for(int i=0;i<20;i++){ > > testList.add("This is a test "+i); > > } > > } > > return testList; > > } > > } > > ---faces-config.xml---- > > > > <faces-config> > > <application> > > <!-- Use the ADF RenderKit --> > > <default-render-kit-id> > > org.apache.myfaces.trinidad.core > > </default-render-kit-id> > > </application> > > <managed-bean> > > <managed-bean-name>testBean</managed-bean-name> > > <managed-bean-class> > > test.TestBean > > </managed-bean-class> > > <managed-bean-scope> > > session > > </managed-bean-scope> > > </managed-bean> > > </faces-config> > > > > ---trinidad-config.xml---- > > > > <trinidad-config > xmlns="http://myfaces.apache.org/trinidad/config"> > > <debug-output>true</debug-output> > > </trinidad-config> > > > > ---test.jspx---- > > > > <?xml version="1.0" encoding="iso-8859-1"?> > > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" > > xmlns:f="http://java.sun.com/jsf/core" > > xmlns:h="http://java.sun.com/jsf/html" > > xmlns:trh="http://myfaces.apache.org/trinidad/html" > > xmlns:tr="http://myfaces.apache.org/trinidad" > > > <jsp:directive.page > contentType="text/html;charset=utf-8"/> > > <f:view> > > <html> > > <body> > > <tr:document title="Export as CSV"> > > <tr:form id="nextForm"> > > <tr:panelPage> > > <tr:table var="str" value="#{testBean.testList}" width="50%" > first="2" rows="3"> > > <tr:column headerText="Name"> > > <tr:outputText value="#{str}"/> > > </tr:column> > > </tr:table> > > </tr:panelPage> > > </tr:form> > > </tr:document> > > </body> > > </html> > > </f:view> > > </jsp:root> > > > > ---Web.xml----- > > > > <?xml version = '1.0' encoding = 'ISO-8859-1'?> > > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > > version="2.4"> > > <context-param> > > <param-name>javax.faces.STATE_SAVING_METHOD</param-name> > > <param-value>client</param-value> > > <!--param-value>server</param-value--> > > </context-param> > > > > <context-param> > > <param-name>javax.faces.DEFAULT_SUFFIX</param-name> > > <param-value>.jspx</param-value> > > </context-param> > > > > <context-param> > > > <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name> > > <param-value>false</param-value> > > </context-param> > > <context-param> > > > <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name> > > <param-value>true</param-value> > > </context-param> > > <context-param> > > > <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name> > > <param-value>session</param-value> > > </context-param> > > <context-param> > > > <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name> > > <param-value>false</param-value> > > </context-param> > > <filter> > > <filter-name>trinidad</filter-name> > > > <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class> > > </filter> > > <filter-mapping> > > <filter-name>trinidad</filter-name> > > <servlet-name>faces</servlet-name> > > </filter-mapping> > > <servlet> > > <servlet-name>faces</servlet-name> > > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > > </servlet> > > <servlet> > > <servlet-name>resources</servlet-name> > > > <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class> > > </servlet> > > <servlet-mapping> > > <servlet-name>faces</servlet-name> > > <url-pattern>/faces/*</url-pattern> > > </servlet-mapping> > > <servlet-mapping> > > <servlet-name>faces</servlet-name> > > <url-pattern>*.faces</url-pattern> > > </servlet-mapping> > > <servlet-mapping> > > <servlet-name>resources</servlet-name> > > <url-pattern>/adf/*</url-pattern> > > </servlet-mapping> > > </web-app> > > -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org

