You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Savantraj, Chennamakal Subramanian" <Sa...@ap.sony.com> on 2002/11/15 06:18:31 UTC

Enabling Disabling

Hi,

Pls share with me if anybody implemented the following concept.
	
	1. Enable and Disable HTML controls based on some control flags on
FormBean.
	2. Not by using disabled attribute in each custom tag.
	3. Idea is to prevent Decision making statements in JSP pages. Also
want to handle some complex logics to decide enabling and disabling(For
Example, using same form for Enquiry,Edit,Insert operations and make
controls enabled or disabled based on the operation)

Pls provide me with your expert opinion.
Best Rgds

-------------------------------------------------------------------
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway. 
-------------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Enabling Disabling

Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Chennamakal" == Chennamakal Subramanian Savantraj <Savantraj> writes:

    Chennamakal> Hi,
    Chennamakal> Pls share with me if anybody implemented the following concept.
	
    Chennamakal> 	1. Enable and Disable HTML controls based on some control flags on
    Chennamakal> FormBean.
    Chennamakal> 	2. Not by using disabled attribute in each custom tag.
    Chennamakal> 	3. Idea is to prevent Decision making statements in JSP pages. Also
    Chennamakal> want to handle some complex logics to decide enabling and disabling(For
    Chennamakal> Example, using same form for Enquiry,Edit,Insert operations and make
    Chennamakal> controls enabled or disabled based on the operation)

Your "disabled" attribute in each tag can reference an array entry of an array
of booleans, one for each "operation type".  These values will be set in your
action, not in the jsp page.  There is no "decision making" in the JSP page.
Use Struts-EL to make the variable references cleaner.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>