You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Adrian Mitev <am...@gmail.com> on 2006/10/27 16:57:31 UTC

DataTable + DataScroller problem.

Hi guys! I have a page with t:dataTable and t:dataScroller. I use
ListDataModel for the table. The data for the table is in session
scoped managed bean. In one of columns there is commandLink that
navigates to details page for the objects of the table. On the details
page there is a back button that navigates back to the dataTable page
via navigation rule.  When i use the scroller to go to other page and
select the details page then get back on the dataTable page with the
back button then the scroller's paginator shows the first page but on
the dataTable is shown the page i was before. I want the dataTable to
be the same as before. Where's the problem?

-- 
Seeing is believing

Re: DataTable + DataScroller problem.

Posted by Adrian Mitev <am...@gmail.com>.
The example in the wiki worked for me. Thank you!

On 10/27/06, Jeff Bischoff <jb...@klkurz.com> wrote:
> Hi Adrian,
>
> I have created a wiki page [1] for this. If the solution there does not
> help you, but you find an alternate solution please add it to the page.
>
> [1] http://wiki.apache.org/myfaces/ManagingDataScrollerPage
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Adrian Mitev wrote:
> > Hi guys! I have a page with t:dataTable and t:dataScroller. I use
> > ListDataModel for the table. The data for the table is in session
> > scoped managed bean. In one of columns there is commandLink that
> > navigates to details page for the objects of the table. On the details
> > page there is a back button that navigates back to the dataTable page
> > via navigation rule.  When i use the scroller to go to other page and
> > select the details page then get back on the dataTable page with the
> > back button then the scroller's paginator shows the first page but on
> > the dataTable is shown the page i was before. I want the dataTable to
> > be the same as before. Where's the problem?
> >
>
>
>


-- 
Seeing is believing

Re: DataTable + DataScroller problem.

Posted by Jeff Bischoff <jb...@klkurz.com>.
Hi Adrian,

I have created a wiki page [1] for this. If the solution there does not 
help you, but you find an alternate solution please add it to the page.

[1] http://wiki.apache.org/myfaces/ManagingDataScrollerPage

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Adrian Mitev wrote:
> Hi guys! I have a page with t:dataTable and t:dataScroller. I use
> ListDataModel for the table. The data for the table is in session
> scoped managed bean. In one of columns there is commandLink that
> navigates to details page for the objects of the table. On the details
> page there is a back button that navigates back to the dataTable page
> via navigation rule.  When i use the scroller to go to other page and
> select the details page then get back on the dataTable page with the
> back button then the scroller's paginator shows the first page but on
> the dataTable is shown the page i was before. I want the dataTable to
> be the same as before. Where's the problem?
> 



AW: DataTable + DataScroller problem.

Posted by Bieringer Dominik <Bi...@gmx.at>.
Hi,

I had the same problem some weeks ago. As far as i can remember, the way to
solve the problem is not to use:

<t:dataTable value="#{someValue}">
</t:dataTable>

Instead use the following for your dataTable:

<t:dataTable binding="#{myBean.myTable}">
</t:dataTable>

The bean have to look like the following:

Public class MyBean
{
	private HtmlDataTable table;
	Getters/Setters for table
}

But be careful, MyBean has to be Session scope. That way, the component
remains the same, even if you come back to the page after rendering some
other pages. The HtmlDataTable contains the current position of the
DataTable which is used by the Paginator.

Hope this helps,

Dominik

-----Ursprüngliche Nachricht-----
Von: Adrian Mitev [mailto:amittev@gmail.com] 
Gesendet: Freitag, 27. Oktober 2006 16:58
An: users@myfaces.apache.org
Betreff: DataTable + DataScroller problem.

Hi guys! I have a page with t:dataTable and t:dataScroller. I use
ListDataModel for the table. The data for the table is in session
scoped managed bean. In one of columns there is commandLink that
navigates to details page for the objects of the table. On the details
page there is a back button that navigates back to the dataTable page
via navigation rule.  When i use the scroller to go to other page and
select the details page then get back on the dataTable page with the
back button then the scroller's paginator shows the first page but on
the dataTable is shown the page i was before. I want the dataTable to
be the same as before. Where's the problem?

-- 
Seeing is believing