• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP read only fields !

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic