You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Detlef Schulze <de...@jaide.de> on 2004/12/02 13:35:14 UTC

Paging through results

Hi,

I have a page that displays some results of a search. Since there may be too
many results, I want to display only a number of results at a time, allowing
the user to navigate to the next and previous results page via some form of
hyperlink. I want to implement the navigation as a component because I will
need it more than once.

How would I do that?  If I would put the code for that not in a component
but in a page I could use DirectLink and a listener method to trigger a
method of the page class, but how can I do this from within a component? I
am probably missing an obvious solution.

>From the question you probably already recognized that this is my first
Tapestry project ...

any hints appreciated ...


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Paging through results

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Do you want the page itself to implement a paging listener?  If so, 
look at how other components that use a listener parameter binding 
work, like @Form, @Submit, etc.  Your paging component could accept a 
listener and invoke it.

If you want the component itself to handle the data too, look at the 
@contrib:Table component to see how it works (though this would be a 
complex endeavor).

	Erik


On Dec 2, 2004, at 7:35 AM, Detlef Schulze wrote:
> Hi,
>
> I have a page that displays some results of a search. Since there may 
> be too
> many results, I want to display only a number of results at a time, 
> allowing
> the user to navigate to the next and previous results page via some 
> form of
> hyperlink. I want to implement the navigation as a component because I 
> will
> need it more than once.
>
> How would I do that?  If I would put the code for that not in a 
> component
> but in a page I could use DirectLink and a listener method to trigger a
> method of the page class, but how can I do this from within a 
> component? I
> am probably missing an obvious solution.
>
>> From the question you probably already recognized that this is my 
>> first
> Tapestry project ...
>
> any hints appreciated ...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org