Your requirements are very similar to a pattern I use with Click. A logged in user has a series of roles. Each menu item defines the roles in which the menu is displayed. The rendering of the menu is performed by a velocity macro, if the user is in one of the roles of the menu it is rendered. This is described below in:
http://incubator.apache.org/click/docs/extras-api/org/apache/click/extras/control/Menu.html The quick start application builder provides a demo of this. If you are using ACEGI Security you can write an ACEGI AccessController to control this display of the menu item, using permissions instead of roles. regards Malcolm Edgar On Sat, Jun 13, 2009 at 3:48 PM, dian<[email protected]> wrote: > > Yes, it might be a nice, > > menu can create dinamically depent on user roles that was login. > so when page is open, it can find user from session and find roles_user in > dbase > what menu must display for that role. > > more modular menu, like on Dotnetnuke CMS / mojoPortal CMS > > > > > Malcolm Edgar-2 wrote: >> >> Hi Dian, >> >> what you will need to do is create the menu dynamically using the >> no-args constructor and setting the properties programatically. You >> may want to store each users menu in their session. >> >> This might be a nice example to include in Click Examples or FAQ. >> >> regards Malcolm Edgar >> >> On Sat, Jun 13, 2009 at 10:03 AM, dian ruzda<[email protected]> wrote: >>> Hello all, I try to make menu control in my page, I see on example must >>> define on menu.xml >>> can I make menu control programatically on java. so I don't need to write >>> menu.xml again coz >>> I wanna make dinamic menu and relate with my dbase ? >>> >>> >>> thx >>> >> >> > > -- > View this message in context: http://n2.nabble.com/menu-tp3070583p3071425.html > Sent from the click-user mailing list archive at Nabble.com. > >
