This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes JSP and the fly likes Enabling/Disabling editing on html form fields in a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Enabling/Disabling editing on html form fields in a JSP" Watch "Enabling/Disabling editing on html form fields in a JSP" New topic
Author

Enabling/Disabling editing on html form fields in a JSP

pramodh somashekara
Ranch Hand

Joined: Jan 30, 2006
Posts: 62
Hi, I have a form with many text fileds in it. I want to restrict editing of the fields based on user groups. Some groups should have editing permission and others should not have. Which is the best way to implement it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62599
    
  68

Moved to the JSP forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62599
    
  68

Use conditionals in the JSP to add the readonly attribute to the restricted fields for users who are not authroized to edit them. Or to not include the fields at all if appropriate.
 
 
subject: Enabling/Disabling editing on html form fields in a JSP