Re: T5.1: get the current page context from a component

2009-06-13 Thread Sergey Didenko
Well, actually what I need is - dedicated activation context for a component, something like current onActivate() for pages - passing request parameters to PageLink, like I'm implementing a pager that generates "forward" - "backward" links without EventLinks to avoid excessive http requests. T

Re: T5.1: get the current page context from a component

2009-06-12 Thread Thiago H. de Paula Figueiredo
Em Fri, 12 Jun 2009 18:54:59 -0300, Sergey Didenko escreveu: And call onPassivate() through reflection, right? Yes. But we can try to find a bfile a JIRA for a better way of getting that info without using reflection. I missed this case because did not expect my "live" page to extend i

Re: T5.1: get the current page context from a component

2009-06-12 Thread Sergey Didenko
And call onPassivate() through reflection, right? I missed this case because did not expect my "live" page to extend interface Component that is returned from componentResources.getPage() Thanks for your answers! On Sat, Jun 13, 2009 at 12:26 AM, Thiago H. de Paula Figueiredo wrote: > Em Fri, 12

Re: T5.1: get the current page context from a component

2009-06-12 Thread Thiago H. de Paula Figueiredo
Em Fri, 12 Jun 2009 18:18:10 -0300, Sergey Didenko escreveu: Well, how I can inject not just ConcretePage but the current page? So the component can be reused on different pages. @Inject ComponentResources and then call its getPage() method. You may need to cast the returned object. --

Re: T5.1: get the current page context from a component

2009-06-12 Thread Sergey Didenko
Well, how I can inject not just ConcretePage but the current page? So the component can be reused on different pages. > You could also inject the container into the component, and then reference > your context somehow directly. Using "inherit" binding also means parameter declaration as I unders

Re: T5.1: get the current page context from a component

2009-06-12 Thread Thiago H. de Paula Figueiredo
Em Fri, 12 Jun 2009 16:32:51 -0300, Andy Pahne escreveu: You could also inject the container into the component, and then reference your context somehow directly. Calling onPassivate() directly? ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor htt

Re: T5.1: get the current page context from a component

2009-06-12 Thread Andy Pahne
Never tried it, but isn't the inherited: binding what you are looking for? You could also inject the container into the component, and then reference your context somehow directly. Andy Sergey Didenko schrieb: Hi, Is there a way to get the page context from a subcomponent? Right now I

T5.1: get the current page context from a component

2009-06-12 Thread Sergey Didenko
Hi, Is there a way to get the page context from a subcomponent? Right now I pass it as a component parameter, but that looks ugly. Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional c