Conditional Displaying form properties - Seek Advice
Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan
Re: Conditional Displaying form properties - Seek Advice
You can use the c:if JSTL tag to perform conditional logic. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:25:43 -0800 Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice
Hi David here is the code, but i dont know how to set up the properties for c:if c:if test=${action == 'add'} do something /c:if where action is one of the properties of my form. what is corrector the setup the test variable in my snippet code? Thanks ahead -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:27 PM Subject: Re: Conditional Displaying form properties - Seek Advice You can use the c:if JSTL tag to perform conditional logic. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:25:43 -0800 Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice
On Wed, 12 Mar 2003 14:34:49 -0800 Dan Tran [EMAIL PROTECTED] wrote: Hi David here is the code, but i dont know how to set up the properties for c:if c:if test=${action == 'add'} do something /c:if where action is one of the properties of my form. what is corrector the setup the test variable in my snippet code? I recommend you download the standard-examples.war file which has examples of all of these tags. They have a simple If.jsp which shows: c:if test=${customer.address.country == 'USA'} /c:if -- Rick Reumann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice
Struts puts your form bean in the request or session scope so you can access it just like any other bean: c:if test=${myForm.action == 'add'} myForm is the name you gave your form in struts-config.xml David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:34:49 -0800 Hi David here is the code, but i dont know how to set up the properties for c:if c:if test=${action == 'add'} do something /c:if where action is one of the properties of my form. what is corrector the setup the test variable in my snippet code? Thanks ahead -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:27 PM Subject: Re: Conditional Displaying form properties - Seek Advice You can use the c:if JSTL tag to perform conditional logic. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:25:43 -0800 Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice
On Wed, 12 Mar 2003 17:44:36 -0500 Rick Reumann [EMAIL PROTECTED] wrote: I recommend you download the standard-examples.war file which has examples of all of these tags. Navigation I find a bit tricky finding the proper stuff to download. You can download the standard stuff here http://www.apache.inetcosmos.org/dist/jakarta/taglibs/standard/ and you'll find a standard-examples.war in there that is very useful. -- Rick Reumann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice
Thank you to both David and Rick, I replace myForm to the form name in my strut config file. Then I recieve the following exception org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute value with value ${loginUserForm.action == 'delete'}: Unable to find a value for action in object of class org.apache.struts.validator.DynaValidatorForm using operator . Then I replace ${loginUserForm.action == 'delete'} for ${loginUserForm[action ]== 'delete'} since my form is a DynaForm however, I dont think ${loginUserForm[action] contains the intended value. am I using the correct syntax? Again, thank you for all advices -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:49 PM Subject: Re: Conditional Displaying form properties - Seek Advice Struts puts your form bean in the request or session scope so you can access it just like any other bean: c:if test=${myForm.action == 'add'} myForm is the name you gave your form in struts-config.xml David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:34:49 -0800 Hi David here is the code, but i dont know how to set up the properties for c:if c:if test=${action == 'add'} do something /c:if where action is one of the properties of my form. what is corrector the setup the test variable in my snippet code? Thanks ahead -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:27 PM Subject: Re: Conditional Displaying form properties - Seek Advice You can use the c:if JSTL tag to perform conditional logic. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:25:43 -0800 Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Displaying form properties - Seek Advice - Solved
The actual syntax for DynaForm is myForm.map.mypropertiy Thank you for everything -Dan - Original Message - From: Dan Tran [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 3:14 PM Subject: Re: Conditional Displaying form properties - Seek Advice Thank you to both David and Rick, I replace myForm to the form name in my strut config file. Then I recieve the following exception org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute value with value ${loginUserForm.action == 'delete'}: Unable to find a value for action in object of class org.apache.struts.validator.DynaValidatorForm using operator . Then I replace ${loginUserForm.action == 'delete'} for ${loginUserForm[action ]== 'delete'} since my form is a DynaForm however, I dont think ${loginUserForm[action] contains the intended value. am I using the correct syntax? Again, thank you for all advices -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:49 PM Subject: Re: Conditional Displaying form properties - Seek Advice Struts puts your form bean in the request or session scope so you can access it just like any other bean: c:if test=${myForm.action == 'add'} myForm is the name you gave your form in struts-config.xml David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:34:49 -0800 Hi David here is the code, but i dont know how to set up the properties for c:if c:if test=${action == 'add'} do something /c:if where action is one of the properties of my form. what is corrector the setup the test variable in my snippet code? Thanks ahead -Dan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 2:27 PM Subject: Re: Conditional Displaying form properties - Seek Advice You can use the c:if JSTL tag to perform conditional logic. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Conditional Displaying form properties - Seek Advice Date: Wed, 12 Mar 2003 14:25:43 -0800 Hi I would like to display/disable a set of form's properties base on another properties in the form. some thing like this html-el:form table if ( theForm.aProperty) { tr td html-el:text property=myprob / /td /tr } /table /html-el:form Advice is greatly appricated. -Dan _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]