• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP read only fields !

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I no that i can set a field to read only, so the user can' t put something into the field.

Im in a situation where i got 15 jsp pages, and i have to check if the user is read only user, if the user is read only he cant put something into the fields, on the whole page....

Any good ideas, how i best do this in practice ???

Did i really have to set read only on every field, or do domeone have some good ideas ???

Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set the readOnly property on form element

OR

what I do is not display the element, just display the text.

Eric
 
Srinivas Krishna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Displaying the text fetching from database is the best idea. if the login is from any of the user other than admin, u just display the fields.

if it is admin, the display should come in the text boxes as editable ones.

try this out
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what I do is not display the element, just display the text


same I do. glad to know many seniors do the same.

I made this post just to add one more in a queue.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Pascarello:

what I do is not display the element, just display the text.


a very wise suggestion...especially if it is a critical requirement as it is really easy to make the readonly fields editable by using browser extensions. Also, make sure that you have server side checks in place too.

Sonny
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sonny Gill:


a very wise suggestion...especially if it is a critical requirement as it is really easy to make the readonly fields editable by using browser extensions.


This is the only thing which came into my mind, and I started to do with no text fields at all but just the value.

it means i started thinking like gurus. just kidding, i am a guru .
[ December 10, 2004: Message edited by: Adeel Ansari ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic