users@woodstock.java.net

Re: login component not rendered following use of JSF page nav

From: Ratnadeep Bhattacharjee <Ratnadeep.Bhattacharjee_at_Sun.COM>
Date: Thu, 21 Feb 2008 15:24:19 -0500

Bill Edwards - Sun BOS Software wrote:
> I was waiting for Deep to respond, as he is the author and expert on
> this component.
> The Login component is an Ajax based component. It initially renders
> "empty" (if
> you will). When the component is "started", it makes an XHR request
> back to the
> server (using Dynamic Faces) to start the login sequence and get the
> first LoginModule
> callback instance. This callback instance determines the widgets to be
> rendered within
> the Login component's client side space. So, I think you have to
> render the page and
> start the Login widget on the client, to get things rolling.
>
> Its the validation method that is used by the Login comonent to
> communicate with
> the JAAS loginContext, etc.
>
> So I'm not sure I can answer the question as to the phase
> listener..... Deep?
>

Now that I think about it should not matter how you get to the login
page. It would be interesting to see what is the value of the
"autoStart" JSON property once you get to the page via a RESTORE_VIEW.
For that matter, the entire set of JSON properties for the login widget.
These properties are the only thing that control how this component behaves.

> Kenneth Suter wrote:
>> In Woodstock 4.2, I have a simple login page containing both a
>> masthead and a login tag, both of which render their respective
>> components under normal circumstances. The login component is
>> specified as:
>>
>> <webuijsf:login autoStart="true" id="login1" serviceName="Auth1"/>
>>
>> However, when I introduce a JSF RESTORE_VIEW PhaseListener that
>> directs traffic to the login page if the user is not authenticated,
>> the masthead renders OK but the login component does not. The
>> PhaseListener directs traffic by checking the user's authentication
>> status and calling NavigationHandler.handleNavigation() with an
>> outcome that references the login page.
>>
>> In stepping through the Login class' source code during a
>> non-forwarded successful rendering of the login component, I noticed
>> that lots of initialization magic happens as a result of
>> Login.processValidators() and validate() methods that does not get
>> called when the the page is forwarded to during the RESTORE_VIEW phase.
>>
>> Is there a way to make the login component render in this usage scenario?
>>
>> Thanks,
>>
>> -Kenneth
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>