jacob_at_hookom.net wrote:
> ****
> Just to follow up-- Seam does @PostConstruct after injection. Since it's acting as a basis for WebBeans/Java EE-- I think it'd be appropriate to match this order now within the RI since the 1.2 spec is currently silent.
> ****
>
Just to follow up to the follow up, I double checked the code.
The order of operation is: Resource Injection, Managed Bean property
initialization, invoke callbacks (@PostConstruct)
>
> You could specify a managed-property that will inject the string user--
>
> #{facesContext.externalContext.remoteUser}
>
> The problem with @PostConstruct is that it happens before property injection.
> So you could put that code, accessing the FacesContext directly into your
> backingbean.
>
> To Roger/Ed/Ryan-- I guess the spec is silent on when the @PostConstruct
> happens exactly. Would it be better to have this happen post injection,
> otherwise the @PostConstruct gains nothing over putting logic in the default
> constructor. At least post property injection, the @PostConstruct method would
> be able to use/process on injected logic.
>
> It'd be nice to inject a user or a request parameter, then basically have the
> @PostConstruct work like an Action's execute method, but done within the
> ManagedBean facility.
>
> I'll double check with Gavin/Seam to see when they invoke these methods within
> the injection process.
>
> -- Jacob
>
>
>
> Roger wrote:
> ===============================
> Hi Chris -
>
> Also, take into account Ryan's follow email about the annotations if
> you're using jsf 1.2.
>
> Thanks, Roger.
>
> ChrisC_at_Dive100.Freeserve.co.uk wrote:
>
>
>> It works - thanks - must have misread something
>>
>>
>>
>>
>>
>>> Why do you say backing beans (managed beans) do not have a constructor?
>>> They are just POJO's, and you should be able to do the initialization.
>>>
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>