Friends,
I'm trying to implement the rolesAdpation in
Struts menu, but I find that its not working. Im pasting the code snippet that I use.
1) in my User POJO i have a variable defined as
private RoleMaster roles; and getters and setters for it.
2) in the User.hbm.xml file, I have a relation like this
many-to-one name="roles" class="com.cpt.liscommon.model.RoleMaster"
cascade="none" outer-join="auto" column="RM_ROLE_ID"
fetch="join" lazy="false"
3) in my menu.jsp I have it as
" menu:useMenuDisplayer name="Velocity" config="/menu.vm" permissions="rolesAdapter"
menu
isplayMenu name="menu.application"
menu
isplayMenu name="menu.users"
menu
isplayMenu name="menu.reports"
menu:useMenuDisplayer "
4) in my menu-confif file
" Menu name="menu.application" title="menu.application.title" description="Application Tables Menu"
Item name="menu.hospitalMaster.load" title="menu.hospital.load" forward="hospitalMaster.load" roles="1000"
Item name="menu.department.load" title="menu.department.load" forward="department.load" roles="1001"
Item name="menu.module.load" title="menu.module.load" forward="module.load" roles="1001"
Item name="menu.transaction.load" title="menu.transaction.load" forward="transaction.load"
Menu "
For the last item i didnt give the rols attribute....
5) I login with a user whose role is 1000 and so I should be able to view the 1st, 2nd and 4th items in the menu.
But any item with roles attribute doesnt appear...The 4th one without the roles attribute alone appears.
Please help me and guide me how to fix it.
Thanks in advance