• 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

Design Issue

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to design my application for which I need a small help
All the JSP pages in our application are user specific for e.g. if the user is an administrator then he can modify the details of a user (displayed on details.jsp) but when the user is a normal user then he can only view the details and cannot modify(here also we want to use the same jsp 'details.jsp'), so all the buttons will be disabled and data will be displayed as a plain text rather then textfields..
I know we can achieve this thru 'if and else', but i don't want to use this approach, as this will clutter my jsp,not to mention adding business logic.
Is their other way to achieve this ?
Please help.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could develop a JSP custom tag for your HTML fields. In the custom tag you can insert the logic as to whether the text field is editable or not.

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