On 30.10.2012 21:11, Ulrich Stärk wrote:
> On 30.10.2012 21:05, Thiago H de Paula Figueiredo wrote:
>> On Tue, 30 Oct 2012 17:44:29 -0200, Ulrich Stärk <u...@spielviel.de> wrote:
>>
>>> 2. Create a UserSource service that looks up the User instance, build a 
>>> PropertyShadowBuilder
>>> around it and bind it to the interface of the User class. Downside: 
>>> requires the User entity to
>>> have an interface.
>>
>> Why don't you implement a InjectionProvider that uses the UserSource to get 
>> the current logged user?
>> This way, you can @Inject private User user;.
>>
> 
> Too obvious I suppose. Sometimes you can't see the most obvious solution, 
> thanks for the pointer.
> 
> Uli
> 

Ok, it seems that the InjectionProvider is evaluated only once, the first time 
the class is
transformed. This doesn't work in my case since on first load, the logged in 
user is always null.

Uli

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to