You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Yazbek, Daniel (Daniel)" <dy...@avaya.com> on 2008/11/24 04:09:08 UTC

Modify navigation menu based on user role

Hi all,

 

Does anyone have a good reference on how to use wicket to modify
navigation menu items based on the role of the user?

 

I am thinking that once logged in, the role of the user is obtained,
then the navigation menu is dynamically build and attached to the main
page according to the role of the logged in user. Is this the
pattern/trend commonly used to achieve this?

 

Any resources/links would be helpful!

 

Thanks

-Daniel.

 

 

 

 

 


Re: Modify navigation menu based on user role

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Here's two basic ideas that are commonly used:

   1. Factory method - have some factory that creates a list of links, only
   adding the links appropriate for the user.  Then display those links through
   a list view (or other similar component).
   2. Add all links method - using this method, you simply put all the links
   that are available to any user in your nav menu.  Each link overrides
   isVisible() and determines whether it should be shown based on who's signed
   in (or build this into your auth strategy).

Hope this helps a little.

On Sun, Nov 23, 2008 at 9:09 PM, Yazbek, Daniel (Daniel)
<dy...@avaya.com>wrote:

> Hi all,
>
>
>
> Does anyone have a good reference on how to use wicket to modify
> navigation menu items based on the role of the user?
>
>
>
> I am thinking that once logged in, the role of the user is obtained,
> then the navigation menu is dynamically build and attached to the main
> page according to the role of the logged in user. Is this the
> pattern/trend commonly used to achieve this?
>
>
>
> Any resources/links would be helpful!
>
>
>
> Thanks
>
> -Daniel.
>
>
>
>
>
>
>
>
>
>
>
>


-- 
Jeremy Thomerson
http://www.wickettraining.com