I think the advent of the async bean manager may have complicated this 
though, right?  I don't *think* I can simply get the bean manager and 
ask it for the bean (there are a couple of different getters now - one 
to get the sync bean manager and one to get the async bean manager).

One thing I tried that worked but that I don't like:  turn the 
@ApplicationScoped bean into a singleton and reference it using a static 
method.  Ugly but worked.  Ideally I think TemplateUtil should itself be 
an injected bean, rather than a class with some static methods.

But that just moves the problem to "how do I reference an injected bean 
in code generated by a Decorator/Extension?"  :)

On 03/27/2013 01:13 PM, Lincoln Baxter, III wrote:
> To answer Question #3, this would either need to be coded into the call
> to TemplateUtil from the BootstrapperImpl code (done in
> DecoratorTemplated.java) or I believe there is a convenience utility to
> get the BeanManager in Errai:
>
> CDI.current() or something like that. Mike?
>
>
> On Tue, Mar 26, 2013 at 12:20 PM, Eric Wittmann
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Hey guys.  I've sketched out a proposed approach (not 100% compete but
>     ok to start) for i18n.  Would appreciate it if you could take a look
>     at it.
>
>     At the bottom you will find 3 questions that I would (in particular)
>     love your thoughts on.
>
>     
> https://docs.google.com/document/d/1BapD4FHMNur0OYdIg-vwXYHWW_2Mhra_Ki2nYAh9qxY/pub
>
>     -Eric
>     _______________________________________________
>     errai-dev mailing list
>     [email protected] <mailto:[email protected]>
>     https://lists.jboss.org/mailman/listinfo/errai-dev
>
>
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.org
> "Simpler is better."
>
>
> _______________________________________________
> errai-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/errai-dev
>
_______________________________________________
errai-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/errai-dev

Reply via email to