jsp display issue with struts framework
Posted on 2007-11-30
I am working on struts. I have total three requirements.
1. Depending the user who logged in ( will be getting from session scope) i need to make "save" button invisible.
I am getting the userid from session scope varibale called ID_BEAN. and i have the following code
in my jsp
I need to make this button invisble when ID_BEAN is "USER" and visible when ID_BEAN is "ADMIN".
2. In the same jsp i have lot of fields for editing. I need to make entire screen disabled (only "view" mode) if the ID_BEAN is "USER' and edit access to "ADMIN" user.
3. i have a checkbox option in the jsp. I need to enable the checkbox only when ID_BEAN is "ADMIN" and disable it when ID_BEAN is "USER"
can anyone please provide the sample code for the above three requirements.