Hi all,

for displaying some data, I´m using the <t:datatable> und the <t:datascroller> tags. Here the code.

<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"
       value="#{projectView.projectModel}"
       var="e"
       preserveDataModel="false"
       rows="2">
       <h:column>
         <f:facet name="header">
           <h:outputText id="headerText1" value="#{bundle.proj_name}"/>
         </f:facet>
         <h:outputText value="#{e.proj_name}"/>
       </h:column>
       <h:column>
         <f:facet name="header">
           <h:outputText id="headerText2" value="#{bundle.proj_descr}"/>
         </f:facet>
         <h:outputText value="#{e.proj_descr}"/>
       </h:column>
<h:column>
<h:commandButton action="#{dataScroller.edit}" value="#{bundle.button_edit}"/>
       </h:column>
       <h:column>
<h:commandButton action="#{dataScroller.delete}" value="#{bundle.button_delete}"/>
       </h:column>
     </t:dataTable>

<h:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered">
       <t:dataScroller
         id="scroll_1"
         for="data"
         fastStep="5"
         pageCountVar="pageCount"
         pageIndexVar="pageIndex"
         styleClass="scroller"
         paginator="true"
         paginatorMaxPages="9"
         paginatorTableClass="paginator"
         paginatorActiveColumnStyle="font-weight:bold;"
         actionListener="#{projectView.scrollerAction}">
         <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>

and the scrollerAction Method (copied from the example app):

public void scrollerAction(ActionEvent event) {
       ScrollerActionEvent scrollerEvent = (ScrollerActionEvent) event;
       FacesContext.getCurrentInstance().getExternalContext().log(
"scrollerAction: facet: " + scrollerEvent.getScrollerfacet() +
               ", pageindex: " + scrollerEvent.getPageIndex());
   }

When I call my jsp, the forward, backward etc. images of the datscroller are rendered.
(rendered HTML:

<td class="standardTable_ColumnCentered"><table class="scroller"><tr><td><a id="_id0:scroll_1first" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1first';document.forms['_id0']['_id0:scroll_1'].value='first'; document.forms['_id0'].submit(); return false;"><img src="images/arrow-first.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td><td><a id="_id0:scroll_1fastr" href="#" 
onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1fastr';document.forms['_id0']['_id0:scroll_1'].value='fastr'; document.forms['_id0'].submit(); return false;"><img src="images/arrow-fr.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td><td><a id="_id0:scroll_1previous" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1previous';document.forms['_id0']['_id0:scroll_1'].value='previous'; document.forms['_id0'].submit(); return false;"><img 
src="images/arrow-previous.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td><td></td><td><a id="_id0:scroll_1next" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1next';document.forms['_id0']['_id0:scroll_1'].value='next'; document.forms['_id0'].submit(); return false;"><img src="images/arrow-next.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td><td><a id="_id0:scroll_1fastf" href="#" 
onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1fastf';document.forms['_id0']['_id0:scroll_1'].value='fastf'; document.forms['_id0'].submit(); return false;"><img src="images/arrow-ff.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td><td><a id="_id0:scroll_1last" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1last';document.forms['_id0']['_id0:scroll_1'].value='last'; document.forms['_id0'].submit(); return false;"><img 
src="images/arrow-last.gif;jsessionid=E2C27AAC58BFB3F645AA84165171A01E" border="1" /></a></td></tr></table></td> )


When I now click lets say on "next", the images of the datasroller dissapear.
(rendered HTML :

<td class="standardTable_ColumnCentered"><table class="scroller"><tr><td><a id="_id0:scroll_1first" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1first';document.forms['_id0']['_id0:scroll_1'].value='first'; document.forms['_id0'].submit(); return false;"><img src="" alt="" /></a></td><td><a id="_id0:scroll_1fastr" href="#" 
onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1fastr';document.forms['_id0']['_id0:scroll_1'].value='fastr'; document.forms['_id0'].submit(); return false;"><img src="" alt="" /></a></td><td><a id="_id0:scroll_1previous" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1previous';document.forms['_id0']['_id0:scroll_1'].value='previous'; document.forms['_id0'].submit(); return false;"><img src="" alt="" 
/></a></td><td></td><td><a id="_id0:scroll_1next" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1next';document.forms['_id0']['_id0:scroll_1'].value='next'; document.forms['_id0'].submit(); return false;"><img src="" alt="" /></a></td><td><a id="_id0:scroll_1fastf" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1fastf';document.forms['_id0']['_id0:scroll_1'].value='fastf'; document.forms['_id0'].submit(); return 
false;"><img src="" alt="" /></a></td><td><a id="_id0:scroll_1last" href="#" onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:scroll_1last';document.forms['_id0']['_id0:scroll_1'].value='last'; document.forms['_id0'].submit(); return false;"><img src="" alt="" /></a></td></tr></table></td> )

I´m using tomahawk1.1.1, Tomcat 5.0.27 and the SUN RI 1.1.

Any hints?

thx, Axel





Reply via email to