You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "tszpinda@gmail.com" <ts...@gmail.com> on 2007/02/14 15:35:21 UTC
How to reset scroller?
Hi,
I'm using your component called t:dataScroller with a4j, but I've got
the same issue with others scrollers like ac:ajaxDataScroller.
So I have t:datatable with some values(ex.10rows), and the scroller,
when I scroll for example to second page, and then I'll clear the
t:datatable(and add one row), the scroller is still set to the second
page, but I need set it to first one, is any way to do it?
In my case it causes rendering the "empty" table after response.
My page looks like:
<t:dataTable forceId="true"
id="organisationList"
var="org"
value="#{organisationList}"
rows="5">
<t:column>
<t:input...
</t:column>
<t:column>
<t:input...
</t:column>
</t:dataTable>
<t:dataScroller id="scroll_1"
for="organisationList"
fastStep="3"
styleClass="scroller"
maxPages="4"
ajaxSingle="true"
renderIfSinglePage="true">
<f:facet name="first">
....
</f:facet>
<f:facet name="last">
...
</f:facet>
</t:dataScroller>
Thanks for you help.
Tomek
Re: How to reset scroller?
Posted by "tszpinda@gmail.com" <ts...@gmail.com>.
Sorted out, thanks a lot.
Tomek
Adrian Mitev wrote:
> Actually it's not bug in the scrollers, it comes from the dataTable.
> Create binding to the dataTable and in the method where you change the
> model put the following: dataTable.setFirst(0);
>
> This should fix your problem. The same is with ac:ajaxDataScroller
>
> 2007/2/14, tszpinda@gmail.com <ma...@gmail.com>
> <tszpinda@gmail.com <ma...@gmail.com>>:
>
> Hi,
>
> I'm using your component called t:dataScroller with a4j, but I've got
> the same issue with others scrollers like ac:ajaxDataScroller.
>
> So I have t:datatable with some values(ex.10rows), and the scroller,
> when I scroll for example to second page, and then I'll clear the
> t:datatable(and add one row), the scroller is still set to the second
> page, but I need set it to first one, is any way to do it?
> In my case it causes rendering the "empty" table after response.
>
> My page looks like:
>
> <t:dataTable forceId="true"
> id="organisationList"
> var="org"
> value="#{organisationList}"
> rows="5">
> <t:column>
> <t:input...
> </t:column>
> <t:column>
> <t:input...
> </t:column>
> </t:dataTable>
>
> <t:dataScroller id="scroll_1"
> for="organisationList"
> fastStep="3"
> styleClass="scroller"
> maxPages="4"
> ajaxSingle="true"
> renderIfSinglePage="true">
> <f:facet name="first">
> ....
> </f:facet>
> <f:facet name="last">
> ...
> </f:facet>
> </t:dataScroller>
>
> Thanks for you help.
>
> Tomek
>
>
Re: How to reset scroller?
Posted by Adrian Mitev <ad...@googlemail.com>.
Actually it's not bug in the scrollers, it comes from the dataTable. Create
binding to the dataTable and in the method where you change the model put
the following: dataTable.setFirst(0);
This should fix your problem. The same is with ac:ajaxDataScroller
2007/2/14, tszpinda@gmail.com <ts...@gmail.com>:
>
> Hi,
>
> I'm using your component called t:dataScroller with a4j, but I've got
> the same issue with others scrollers like ac:ajaxDataScroller.
>
> So I have t:datatable with some values(ex.10rows), and the scroller,
> when I scroll for example to second page, and then I'll clear the
> t:datatable(and add one row), the scroller is still set to the second
> page, but I need set it to first one, is any way to do it?
> In my case it causes rendering the "empty" table after response.
>
> My page looks like:
>
> <t:dataTable forceId="true"
> id="organisationList"
> var="org"
> value="#{organisationList}"
> rows="5">
> <t:column>
> <t:input...
> </t:column>
> <t:column>
> <t:input...
> </t:column>
> </t:dataTable>
>
> <t:dataScroller id="scroll_1"
> for="organisationList"
> fastStep="3"
> styleClass="scroller"
> maxPages="4"
> ajaxSingle="true"
> renderIfSinglePage="true">
> <f:facet name="first">
> ....
> </f:facet>
> <f:facet name="last">
> ...
> </f:facet>
> </t:dataScroller>
>
> Thanks for you help.
>
> Tomek
>