How to perform nested Page flow invocation within a Portal - Weblogic
This is a discussion on How to perform nested Page flow invocation within a Portal - Weblogic ; Hello,
I face a problem when I try to invocate another page flow (Login=20
Checking) when the initiating pageflow (Shopping cart) is perform a=20
saving action from an anonymous user, which should be redirect to Login=20
Checking flow and the ...
-
How to perform nested Page flow invocation within a Portal
Hello,
I face a problem when I try to invocate another page flow (Login=20
Checking) when the initiating pageflow (Shopping cart) is perform a=20
saving action from an anonymous user, which should be redirect to Login=20
Checking flow and the return back to the shopping cart flow's saving=20
action automatically. Sample programs contains a login/create account=20
example but it used a redirect attribute in the nested flow which I=20
can't use it as we are doing a portal application contains groups of=20
portlets. Can someone give me some help.
Thanks.
Andy
-
Re: How to perform nested Page flow invocation within a Portal
Hi Andy,
You got to redirect your control to the login page which has your login por=
tlet.
Also you got to store the user session ( such as shopping cart values) in t=
he
pieplinesession which you can use for redirection after the successful logo=
n.
Regards
Zulfi
surfboy <hksurfer@yahoo.com.hk> wrote:
>Hello,
>
>I face a problem when I try to invocate another page flow (Login=20
>Checking) when the initiating pageflow (Shopping cart) is perform a=20
>saving action from an anonymous user, which should be redirect to Login
>
>Checking flow and the return back to the shopping cart flow's saving
>
>action automatically. Sample programs contains a login/create account
>
>example but it used a redirect attribute in the nested flow which I
>
>can't use it as we are doing a portal application contains groups of
>
>portlets. Can someone give me some help.
>
>Thanks.
>
>Andy
>
-
Re: How to perform nested Page flow invocation within a Portal
Hello Andy,
I'm attaching an example of what (I think) you're trying to do. In it ther=
e
is a nested page flow that handles login, and when it's done running it
tries to rerun the shopping-cart-save action on successful login, or it
simply returns to the current page if the user cancels the login. Some
notes:
- This example doesn't use redirects.
- In this example I'm using PageFlowController.login(), which logs the
user into Weblogic. You could of course use your own login scheme. Also,
Portal's User Management controls provide a much richer set of user
management functionality for dealing with Weblogic user accounts.
- In the example I forwarded explicitly to "/login/loginController.jpf"
from my save() action in shoppingController.jpf. A more elegant thing to d=
o
would be to mark save() as login-required...
/**
* @jpf:action login-required=3D"true"
*/
...which would cause a NotLoggedInException to be thrown if the use=
r
hit the action when not logged in. This exception could be handled with a
@jpf:catch at the class level, *or* on Global.app:
/**
* @jpf:catch type=3D"com.bea.wlw.netui.pageflow.NotLoggedInExcepti=
on"
path=3D"/login/loginController.jpf"
*/
If you do this, then you can still handle the return-actions from
loginController.jpf in the same way that's shown in the example... but if
you're catching the exception in Global.app, then you'd put the two
return-action handlers (the ones with the return-to forwards) in Global.app=
..
Hit /shopping/shoppingController.jpf to try it out. Hope this helps.
Rich
p.s. I'm running a later version of Workshop -- if for some reason you have
problems with either of the page flows in the IDE, try the attached
loginExample_ga.zip instead of loginExample.zip.
"surfboy" <hksurfer@yahoo.com.hk> wrote in message
news:3F2DC121.9020008@yahoo.com.hk...
> Hello,
>
> I face a problem when I try to invocate another page flow (Login
> Checking) when the initiating pageflow (Shopping cart) is perform a
> saving action from an anonymous user, which should be redirect to Login
> Checking flow and the return back to the shopping cart flow's saving
> action automatically. Sample programs contains a login/create account
> example but it used a redirect attribute in the nested flow which I
> can't use it as we are doing a portal application contains groups of
> portlets. Can someone give me some help.
>
> Thanks.
>
> Andy
>
[loginExample_ga.zip]
[loginExample.zip]