-
1. Re: dataScroller not updating
ilya_shaikovsky Jun 11, 2007 12:03 PM (in response to grimholtz)Hm.. Just used your code with the control like
<rich:datascroller for="table" id="scroller" /> <h:inputText value="#{capitalsBean.rows}"></h:inputText> <a4j:commandButton value="Change rows count" reRender="table, scroller"/>
works as expected for me. -
2. Re: dataScroller not updating
grimholtz Jun 11, 2007 12:37 PM (in response to grimholtz)Must I use rich:datascroller? I cannot use t:datascroller?
-
3. Re: dataScroller not updating
grimholtz Jun 11, 2007 12:38 PM (in response to grimholtz)The reason I ask is because we don't use RichFaces now, just ajax4jsf. I'm not sure I want to import another library into the project.
-
4. Re: dataScroller not updating
grimholtz Jun 11, 2007 12:54 PM (in response to grimholtz)I just tried rich:datascroller. It does not work for me because it doesn't support a lot of the attributes that t:datascroller does. Here are two of my datascrollers. You can see rich:datascroller doesn't support a lot of these attributes:
< t:dataScroller id="ds2 for="table" rowsCountVar="rowsCount" displayedRowsCountVar="displayedRowsCountVar" firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex" pageCountVar="pageCount" immediate="true" pageIndexVar="pageIndex"> < h:outputFormat value="{0} row found."> < f:param value="#{rowsCount}" /> < f:param value="#{firstRowIndex}" /> < f:param value="#{lastRowIndex}" /> < f:param value="#{pageIndex}" /> < f:param value="#{pageCount}" /> < /h:outputFormat> < h:outputFormat value="Displaying rows {1} to {2}."> < f:param value="#{rowsCount}" /> < f:param value="#{firstRowIndex}" /> < f:param value="#{lastRowIndex}" /> < f:param value="#{pageIndex}" /> < f:param value="#{pageCount}" /> < /h:outputFormat> < h:outputFormat value="This is page {3} of {4}"> < f:param value="#{rowsCount}" /> < f:param value="#{firstRowIndex}" /> < f:param value="#{lastRowIndex}" /> < f:param value="#{pageIndex}" /> < f:param value="#{pageCount}" /> < /h:outputFormat> < /t:dataScroller> < t:dataScroller id="ds1" for="table" fastStep="10" paginator="true" paginatorMaxPages="9" paginatorTableClass="tClass" immediate="true" rowsCountVar="rowsCount" pageCountVar="pageCount"pageIndexVar="pageIndex" firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex" paginatorActiveColumnClass="paginator-active-column"> < f:facet name="first">...< /f:facet> < f:facet name="last">...</f:facet> < f:facet name="previous">...< /f:facet> < f:facet name="next">...< /f:facet> < f:facet name="fastforward">...< /f:facet> < f:facet name="fastrewind">...< /f:facet> < /t:dataScroller>
Any other ideas?
thank you,
grimholtz -
5. Re: dataScroller not updating
wesleyhales Jun 13, 2007 10:16 AM (in response to grimholtz)I just got a post to my blog about someone getting this to work... here
But, t:datascroller has always been a problem... I would recommend not wating time and go ahead and import Richfaces. I would take their components over the Tomahawk stuff any day. -
6. Re: dataScroller not updating
grimholtz Jun 13, 2007 10:50 AM (in response to grimholtz)"wesleyhales" wrote:
I just got a post to my blog about someone getting this to work... <a href="http://www.jroller.com/page/wesleyhales/?anchor=ajax4jsf_vs_ajaxanywhere_the_t">here</a>
But, t:datascroller has always been a problem... I would recommend not wating time and go ahead and import Richfaces. I would take their components over the Tomahawk stuff any day.
Thanks! I'll give it a try. Quoted here:You can actually get the datascroller to update as well, by putting it in a <t:div> container and having that element updated.
The code then becomes :
<a4j:form ajaxSubmit="true" reRender="carList,carIndex,scroll_1_div">
...
<t:div id="scroll_1_div">
<t:dataScroller id="scroll_1"
...
Works like a charm! -
7. Re: dataScroller not updating
grimholtz Jun 13, 2007 2:49 PM (in response to grimholtz)This works. If you don't use a4j:form, you can also use:
<h:form> ... <t:div id="div4a4j"> <t:dataScroller ... /> </t:div> </h:form
wesleyhales--thanks very much! -
8. Re: dataScroller not updating
grimholtz Jun 13, 2007 2:52 PM (in response to grimholtz)"grimholtz" wrote:
This works. If you don't use a4j:form, you can also use:<h:form> ... <t:div id="div4a4j"> <t:dataScroller ... /> </t:div> </h:form
wesleyhales--thanks very much!
I forgot to include the commandButton, of course:<a4j:commandButton value="submit" reRender="myTable,divForAjax1"/>