URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - 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: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
Try a combination of logic:equal and logic:NotEqual... Also try TRUE (In caps..)I had similar problems and i solved them using those techniques... -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 10:25 AM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - 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] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - 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: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
You are missusing logic:equal tag : logic:equal name=childDetail parameter=rateClassTCSGRTE - if you want to test a bean property, use name= property= - if you want to test a request parameter, use parameter= using name + parameter has no sense. Nico I can use the logic:NotEqual tag but I need to activate some display if the condition is true. How to handle that if I use logic:notEqual tag..Becuase then I need to go to the next counter in the iterate tag if the condition does not match.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ html:text name=childDetail property=rateClassTCSGRTE size=3 / /logic:equal /logic:iterate /logic:equal ALL suggestions welcome !! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Try a combination of logic:equal and logic:NotEqual... Also try TRUE (In caps..)I had similar problems and i solved them using those techniques... -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 10:25 AM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - 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] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
You're code has a XML error : property=rateClassTCSGRTE value=%=ss%/ The / close the tag without body content, so the equal test has no effect use : logic:equal name=childDetail property=rateClassTCSGRTE value=%=ss% System.out.println(THIS ALWAYS RUNS EVEN IF CONDITION FAILS) /logic:equal Nico. I am using property only...Was trying earlier to see if parameter will work in case property does not work..Code below for your reference.. logic:equal name=awbDetailUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail property=rateClassTCSGRTE value=%=ss%/ System.out.println(THIS ALWAYS RUNS EVEN IF CONDITION FAILS) /logic:equal /logic:iterate /logic:equal Yogesh -Original Message- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:36 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations You are missusing logic:equal tag : logic:equal name=childDetail parameter=rateClassTCSGRTE - if you want to test a bean property, use name= property= - if you want to test a request parameter, use parameter= using name + parameter has no sense. Nico I can use the logic:NotEqual tag but I need to activate some display if the condition is true. How to handle that if I use logic:notEqual tag..Becuase then I need to go to the next counter in the iterate tag if the condition does not match.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ html:text name=childDetail property=rateClassTCSGRTE size=3 / /logic:equal /logic:iterate /logic:equal ALL suggestions welcome !! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Try a combination of logic:equal and logic:NotEqual... Also try TRUE (In caps..)I had similar problems and i solved them using those techniques... -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 10:25 AM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text /logic:iterate /logic:equal /logic:iterate This is not working even if conditions are not matching. It prints the html:text even if equal is not matching !! Any inputs would be appreciated.. Cheers :) DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error
Re: [SOLVED] RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations ????
You're welcome. Nico. Nicolas, there was an error like you mentioned in the ending tag.. It did not give any compilation errors however... SURPRISE!! Anyway, I corrected that and its working now... Great input people and thanks to all and specially to NICOLAS.. Cheers :) -Original Message- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:47 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations You're code has a XML error : property=rateClassTCSGRTE value=%=ss%/ The / close the tag without body content, so the equal test has no effect use : logic:equal name=childDetail property=rateClassTCSGRTE value=%=ss% System.out.println(THIS ALWAYS RUNS EVEN IF CONDITION FAILS) /logic:equal Nico. I am using property only...Was trying earlier to see if parameter will work in case property does not work..Code below for your reference.. logic:equal name=awbDetailUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail property=rateClassTCSGRTE value=%=ss%/ System.out.println(THIS ALWAYS RUNS EVEN IF CONDITION FAILS) /logic:equal /logic:iterate /logic:equal Yogesh -Original Message- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:36 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations You are missusing logic:equal tag : logic:equal name=childDetail parameter=rateClassTCSGRTE - if you want to test a bean property, use name= property= - if you want to test a request parameter, use parameter= using name + parameter has no sense. Nico I can use the logic:NotEqual tag but I need to activate some display if the condition is true. How to handle that if I use logic:notEqual tag..Becuase then I need to go to the next counter in the iterate tag if the condition does not match.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ html:text name=childDetail property=rateClassTCSGRTE size=3 / /logic:equal /logic:iterate /logic:equal ALL suggestions welcome !! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Try a combination of logic:equal and logic:NotEqual... Also try TRUE (In caps..)I had similar problems and i solved them using those techniques... -Original Message- From: Chawla, Yogesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 10:25 AM To: 'Struts Users Mailing List' Subject: RE: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations I am specifying the complete values. The e.g I had written was simplistic for getitng some help! The code is something like this.. logic:equal name=aUpdateForm property=viewChildRecord value=true logic:iterate id = childDetail name=coll logic:equal name=childDetail parameter=rateClassTCSGRTE value=%=ss%/ Any ideas.. regards. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:18 PM To: Struts Users Mailing List Subject: Re: URGENT :: LOGIC:EQUAL works only with one constant Value ?? Not R epeat Iterations Sure it works, but you don't specify the property of the variable, name of the variable to be compared to. So that's why it doesn't evaulate to equal. Here, take a peek : http://jakarta.apache.org/struts/userGuide/struts-logic.html#equal Chawla, Yogesh wrote: Hello, I have a repeat nested tag logic like this : The Struts Documentation on ligoc tags mentions this for the logic:equal tag. Why is it that it can only be checked against one contant value ? equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Can I use something like this : logic:iterate id=resultCounter logic:equal value=changing value in each iterate tag based on id resultCounter logic:iterate if resultCounter matches the value, then get the results html:text name=resultCounter property=value1Text