File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 61105
    
  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: 61105
    
  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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Enabling/Disabling editing on html form fields in a JSP