cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mata <manuel_mata_ru...@yahoo.es>
Subject Re: Cocoon pagination
Date Tue, 10 Apr 2007 11:04:33 GMT
That was exactly what I was thinking, but I thought
that pagination rules needed to be static because of
configuration of paginator at startup or something
like that.

For Limited values I'll use some links at the html
page with the values, but this doesnt prevent of
writing it directly at the URI.

I'll try it, and surely will work. Thx.


--- Grzegorz Kossakowski <gkossakowski@apache.org>
escribió:

> Manuel Mata napisał(a):
> > Hi all.
> > 
> > I'm using cocoon pagination transformer and it
> works
> > nice for elements, but i would like to add the
> feature
> > to my application of choose dinamically the number
> of
> > items in listing, because it is always the same as
> it
> > is defined in pagination rules.
> > 
> > I should use an http parameter for it, I mean 'ip'
> for
> > items per page, and would like to pass it to the
> > pagination transformer via the sitemap, just like
> the
> > number of page, but I dont know if this would
> work. I
> > didnt find anything in the docs, even I read that
> > pagination rules are inmutable in the cocoon api.
> > 
> > Should this be posible ? Thx for your time.
> > 
> 
> By dynamic you mean that you want to let user choose
> from *limited* set of possible values for 'ip',
> right?
> Limited is crucial here. You could just easily
> generate pagination rules using other Cocoon
> pipeline instead of using
> static file. This should work well and not harm your
> performance as long as you do not break caching.
> 
> You should do this:
> <map:transform
> src="cocoon:/pagination-rules?ip={request-param:ip}"
> type="paginator">
> and have following pipeline:
> <map:match pattern="pagination-rules">
>   <map:generate src="pagination-rules-template.xml"
> type="jx">
>     <map:parameters name="ip"
> value="{request-param:ip}"/>
>   </map:generate>
>   <map:serialize type="xml"/>
> </map:match>
> 
> 
> The problem with this approach is that there is no
> place where we limit set of possible values of ip
> parameter. However,
> I hope it will give you starting point.
> 
> -- 
> Grzegorz Kossakowski
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 



       
____________________________________________________________________________________
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message