aspose file tools*
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: 61226
    
  66

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: 61226
    
  66

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Enabling/Disabling editing on html form fields in a JSP