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
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
Set the readOnly property on form element
OR
what I do is not display the element, just display the text.
Eric
Srinivas Krishna
Greenhorn
Joined: Dec 10, 2004
Posts: 8
posted
0
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
Srinivas Krishna
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
posted
0
what I do is not display the element, just display the text
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
Joined: Aug 15, 2004
Posts: 2874
posted
0
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 ]