• 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

Display uneditable field in jsp

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the form need to display the text in one field and date in another.
These should not be modifiable.
<spring: bind path="">
<input name="" value=""/>
</spring:bind>

When I use the above tag, it is editable.
If any knows how to display uneditable fields, please let me know

This is emergency.

Thanks.
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this,

<spring: bind path="">
<input name="" value="" readonly />
</spring:bind>
 
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
Keep in mind that it is easy to change an input field with 'readonly' attribute to be editable.
Moreover, showing that value in a text field when user cannot edit it, can be somewhat confusing for the user. Better to show the value as normal text, and include a hidden parameter.

Finally, You cannot depend on the front end to not change the value of a field. If it is supposed to be unmodifiable, You should make sure of that in the server side code handling the form submission.

HTH
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic