do use an exception flow for that thats a bit better.
see
RestartResponseException
On Dec 16, 2007 2:46 PM, John Krasnay <[EMAIL PROTECTED]> wrote:
> On Sat, Dec 15, 2007 at 08:44:32PM -0800, Cristina wrote:
> >
> > Hello,
> >
> > I'm working on an app where users and admins will perform mutually
> exclusive
> > use cases. That's quite a common situation. It looks like the simpler
> > approach here would be to return one home page with the user menu and
> > another one with the admin menu. The choice would be placed in the Login
> > page and executed according to the profile of the username that's trying
> to
> > access the app.
> >
>
> A technique I've used is to have a dummy home page that just redirects
> to one page or the other:
>
> public class HomePage extends WebPage {
> public HomePage() {
> if (isUser()) {
> setResponsePage(UserHomePage.class);
> } else {
> setResponsePage(AdminHomePage.class);
> }
> }
> }
>
> You don't even need a HomePage.html file.
>
> jk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>