for services (defined in AppModule) you get dependancies by declaring
them in constructor for simple services, and you can declare
any dependancy in AppModule methods as parameter.

you use  @Inject in pages and components,
ant those are recognized by putting them into right packages:
pages,components,base,mixins

you'll get the hang of it while using tapestry


Davor Hrg

On Feb 18, 2008 9:35 PM, ryanskow <[EMAIL PROTECTED]> wrote:
>
> Ok, this apparently is not the right way to do things...
>
> ryanskow wrote:
> >
> > @ApplictionState
> > private User loggedInUser;
> >
>
> Taking the pattern from:
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2
>
> I am now able to use the ApplicationStateManager directly by passing it into
> the filter in the AppModule contribute:
>
>     public void contributeComponentActionRequestHandler(
>             OrderedConfiguration<ComponentEventRequestFilter> configuration,
>             ComponentClassResolver componentClassResolver,
>             ApplicationStateManager asm)
>     {
>
>         configuration.add("MyComponentEventRequestFilter",
>                 new MyComponentEventRequestFilter(componentClassResolver,
> asm), "after:*");
>     }
>
>
> I'm still getting used to this IOC concept and still don't understand
> exactly when you can just inject and when you can add 'magic' parameters to
> a method and have them be introduced automagically.
>
> Now all that is left is figuring out what method the action is going to
> invoke to know where to pull the annotations from.  Hopefully that is
> available in one of the contexts I've got and I don't have to resort to some
> sort of brute force reflection mechanism.
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/Can-a-page-do-something-before-actions-are-invoked-on-it--tp15509207p15549067.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to