This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 "
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.