Hi,
   
   You have used <t:dataScroller> twice in the page .
Remove the second one. Rest is I think ok. If still
some problem is there pls let me know I have worked a
lot on this. May be I will be able to help you.

Regards....
Arvind


--- Feris Thia <[EMAIL PROTECTED]> wrote:

>  Hi,
> 
> I'm quite new to JSF and MyFaces. I have page that
> will do searching based
> on a keyword and populate table with paging
> capability. I'm using lates
> stable MyFaces and Tomahowk extension.
> 
> The problem is I can only seen 1 page. And when I
> try to move to another
> page. I have no data display on my dataTable.
> 
> Can someone give me some clue on my problem ??
> 
> My JSP page is shown below
>
-------------------------------------------------------------------------------------------------------------------
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">
> <%@ taglib uri="http://java.sun.com/jsf/core";
> prefix="f" %>
> <%@ taglib uri="http://java.sun.com/jsf/html";
> prefix="h" %>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk";
> prefix="t"%>
> <HTML>
> <HEAD>
> <TITLE><h:outputText
> value="#{prop.appTitle}"/></TITLE>
> <link rel="stylesheet" type="text/css"
> href="./css/basic.css" />
> </HEAD>
> <BODY>
> <body>
> <f:view>
> <h:form>
> 
>     <f:loadBundle
>
basename="org.apache.myfaces.examples.resource.example_messages"
> var="example_messages"/>
> 
>       <h:commandButton id="validateButton" type="submit"
> value="search"
> actionListener="#{mydocs.doSearch}"/>
> 
>       <h:panelGroup id="body">
>         <t:dataTable id="data"
>                 styleClass="scrollerTable"
>                 headerClass="standardTable_Header"
>                 footerClass="standardTable_Header"
>                
> rowClasses="standardTable_Row1,standardTable_Row2"
> 
>
columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
>                 var="car"
>                 value="#{mydocs.data}"
>                 preserveDataModel="true"
>                 rows="10"
>            >
>            <h:column>
>                <f:facet name="header">
>                </f:facet>
>                <h:outputText
> value="#{car.documentID}" />
>            </h:column>
> 
>            <h:column>
>                <f:facet name="header">
>                   <h:outputText
> value="#{example_messages['label_cars']}" />
>                </f:facet>
>                <h:outputText
> value="#{car.documentName}" />
>            </h:column>
> 
>            <h:column>
>                <f:facet name="header">
>                   <h:outputText
> value="#{example_messages['label_color']}" />
>                </f:facet>
>                <h:outputText
> value="#{car.documentName}" />
>            </h:column>
> 
>         </t:dataTable>
> 
>         <h:panelGrid columns="1"
> styleClass="scrollerTable2"
> columnClasses="standardTable_ColumnCentered" >
>             <t:dataScroller id="scroll_1"
>                     for="data"
>                     fastStep="10"
>                     pageCountVar="pageCount"
>                     pageIndexVar="pageIndex"
>                     styleClass="scroller"
>                     paginator="true"
>                     paginatorMaxPages="9"
>                     paginatorTableClass="paginator"
>                    
> paginatorActiveColumnStyle="font-weight:bold;"
>                     immediate="true"
>                     >
>                 <f:facet name="first" >
>                     <t:graphicImage
> url="images/arrow-first.gif" border="1" />
>                 </f:facet>
>                 <f:facet name="last">
>                     <t:graphicImage
> url="images/arrow-last.gif" border="1" />
>                 </f:facet>
>                 <f:facet name="previous">
>                     <t:graphicImage
> url="images/arrow-previous.gif"
> border="1" />
>                 </f:facet>
>                 <f:facet name="next">
>                     <t:graphicImage
> url="images/arrow-next.gif" border="1" />
>                 </f:facet>
>                 <f:facet name="fastforward">
>                     <t:graphicImage
> url="images/arrow-ff.gif" border="1" />
>                 </f:facet>
>                 <f:facet name="fastrewind">
>                     <t:graphicImage
> url="images/arrow-fr.gif" border="1" />
>                 </f:facet>
>             </t:dataScroller>
>             <t:dataScroller id="scroll_2"
>                     for="data"
>                     rowsCountVar="rowsCount"
>                    
> displayedRowsCountVar="displayedRowsCountVar"
>                     firstRowIndexVar="firstRowIndex"
>                     lastRowIndexVar="lastRowIndex"
>                     pageCountVar="pageCount"
>                     immediate="true"
>                     pageIndexVar="pageIndex"
>                     >
>                 <h:outputFormat
> value="#{example_messages['dataScroller_pages']}"
> styleClass="standard" >
>                     <f:param value="#{rowsCount}" />
>                     <f:param
> value="#{displayedRowsCountVar}" />
>                     <f:param
> value="#{firstRowIndex}" />
>                     <f:param value="#{lastRowIndex}"
> />
>                     <f:param value="#{pageIndex}" />
>                     <f:param value="#{pageCount}" />
>                 </h:outputFormat>
>             </t:dataScroller>
>         </h:panelGrid>
> 
>     </h:panelGroup>
>     <t:commandLink value="test" immediate="true" />
> 
> </h:form>
> </f:view>
> 
> </body>
> </BODY>
> </HTML>
> 
> 
>
-------------------------------------------------------------------------------------------------------------------
> 
> and my bean as follows..
> 
>
-------------------------------------------------------------------------------------------------------------------
> 
> 
> *package* org.phi.dms;
> 
> *import* java.io.Serializable;
> *import* java.util.LinkedList;
> *import* java.util.List;
> 
> *import* javax.faces.event.ActionEvent;
> 
> *public* *class* DocumentsList *implements*
> Serializable {
>       /**
>        *
>        */
>       *private* *static* *final* *long* serialVersionUID
> = 1;
>       
>       *private* List objDocs = *new* LinkedList();
>       
>       *public* *void* addDocument(Document e)
>       {
>               objDocs.add(e);
>       }
>       
>       *public* List getData()
>       {       
>               *return* objDocs;
>       }
>       
> 
=== message truncated ===



                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Reply via email to