Or create a single page used by both user as an entry point and have
different menu options visible depending on the user.
Hint: a security framework like swarm can easily do this. :D ;)
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Maurice

On Dec 16, 2007 5:02 PM, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> Why not:
> Application#getHomePage() {
>     if(!isUser()) { return AdminPage.class; }
>     return UserPage.class;
> }
>
> 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]
> >
> >
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-rc1 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to