• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

managing users , roles , privileges

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have worked using strut for sometime and i was using the tag


to show and hide the links/buttons and privileges depending upon the role of the user and its privileges

for example some users have the privileges to see the 'list user management' icon link and some not.
and in the level of the page also , that is not all the users who have privileges to view the users list, can edit or delete.

is there any component similar to logic:equal in strut , or how i can i manages the users , their roles and their privileges

by the way the roles and privileges are dynamic data stored in db .

Thanking you in Advance
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reply
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can hide elements by using the redered attribute:
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Wouter Oet ....... it is exactly what I was looking for .
 
Saloon Keeper
Posts: 22483
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although the Apache Tomahawk tag library has tags which have direct role support, most JSF does not, unfortunately. So the "rendered" attribute is the usual solution.

In general, however, it's better to keep complex expressions off the View and in the backing bean. So instead of :


You might want something simpler and more targeted, such as

where

 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic