Re: [T5.3] Passing page activation context to a component

2011-08-25 Thread Borut Bolčina
Man, thank you! In case somebody else will search for this answer before reading http://tapestry.apache.org/environmental-services.html here is a sample code: Index.java == @Inject private Environment environment; private MyComponentContext myComponentContext; p

Re: [T5.3] Passing page activation context to a component

2011-08-24 Thread Steve Eynon
> As soon as one component pops the object(s) Ahh - that's why there's an Environement.peek() !!! Or, in your component, you could just annotate the Object with @Environmental, e.g. @Environmental private MyTwoStrings ss; Steve. -- Steve Eynon On 24 August 2011 21:33, Borut Bolčina wrote: >

Re: [T5.3] Passing page activation context to a component

2011-08-24 Thread Borut Bolčina
2011/8/24 Steve Eynon > If the component needs 2 string parameters to function, then it needs > 2 string parameters! (Much like if a method needs 2 strings, then you > need to pass 2 strings.) > > Well, yes :-) > Other alternatives are dependent on re-usability requirements: > > a) If the 2 str

Re: [T5.3] Passing page activation context to a component

2011-08-24 Thread Steve Eynon
If the component needs 2 string parameters to function, then it needs 2 string parameters! (Much like if a method needs 2 strings, then you need to pass 2 strings.) Other alternatives are dependent on re-usability requirements: a) If the 2 strings are always used together then wrap them in a valu