This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes How to enable attributes in the JQuerygrid based on the user role ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "How to enable attributes in the JQuerygrid based on the user role ?" Watch "How to enable attributes in the JQuerygrid based on the user role ?" New topic
Author

How to enable attributes in the JQuerygrid based on the user role ?

Yuva Kumar
Greenhorn

Joined: Jul 18, 2008
Posts: 12
Hi

I am doing a web application, in which my backend is a struts2 based java server and the frontend I am using JQuerygrid for populating the data from mysql database. All these are working fine. What I am searching for is, depending upon the user's role, the attributes in the <sjg:grid> should be enabled.

For eg., for an Administrator with role ADMIN, I need the user to be able to Add / Modify / Delete / View data for a master, whereas for an user with role GUEST, I need to provide only VIEW option for the master data.

ie.,


I am using struts2 v2.2, JQuery v2.5, JSON v2.2. Can someone please advise, how I can get this. Please let me know if any more information is required.

Thanks and regards

Yuva
Gopakumar Naryanan
Ranch Hand

Joined: Jan 15, 2011
Posts: 71

Does it make any sense using jstl tags like <c:choose ></c:choose> TAGS?


Thanks & Regards
Gopakumar
Yuva Kumar
Greenhorn

Joined: Jul 18, 2008
Posts: 12
Gopakumar Naryanan wrote:Does it make any sense using jstl tags like <c:choose ></c:choose> TAGS?


Thanks for your reply, but can you give me an example please.

Regards

Yuva
Gopakumar Naryanan
Ranch Hand

Joined: Jan 15, 2011
Posts: 71


I am not sure whether you are expecting something internal to grid.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to enable attributes in the JQuerygrid based on the user role ?
 
Similar Threads
Struts2 Grid Plugin. Using my Insert record forms.
passing values from struts2 form to javascript
Struts 2 jquery grid delete option is not working
migration to Struts2
struts2 with Jquery javascript issue