You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by VenkatBabu <bs...@yahoo.co.in> on 2008/06/06 18:54:27 UTC

How to pass dynamic value to the logic:equal tag?

I am new to this forum...forgive me if the question that i am going to raise
is already present. I dont have time to go through all the messages which
have been raised already.

The problem is: 
I have <logic:iterate id="ID1" name="formbeanname" property="VectorInBean"
indexid="index"> 
<logic:equal name="ID1" property="index" value="Dynamic Value from the
bean"> 

logic:equal tag's value attribute shoud get populated by a value from the
bean(i am storing the size of the vector in bean) which is used in the
logic:iterate. I dont want to use scriptlets. 

Actually the problem is the Vector in the bean has list of strings which
needs to be shown in the JSP one by one sepeared by "commas(,)" and we need
to add "and" before the last string from the vector. So i need to check it
dynamically whether the vector is reached the last but one. 

I need to solve this issue as soon as possible. Any help would be very
grateful. 
-- 
View this message in context: http://www.nabble.com/How-to-pass-dynamic-value-to-the-logic%3Aequal-tag--tp17696748p17696748.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to pass dynamic value to the logic:equal tag?

Posted by VenkatBabu <bs...@yahoo.co.in>.
Thanks for your reply Jim...
But the problem is the Vector consists of Strings of codes where i am
passing the codes to the custom tag in the JSP page, which will give the
corresponding information. 
So i cant go by generating the string in Java function. I need to do that in
JSP itself.

Please suggest me some other idea...

Jim Kiley wrote:
> 
> I would compose the string from the vector in a Java function, and call
> that
> function to get the String, instead of just accessing the Vector.  Is
> there
> a reason you couldn't do that?
> 
> jk
> 
> On Fri, Jun 6, 2008 at 12:54 PM, VenkatBabu <bs...@yahoo.co.in> wrote:
> 
>>
>> I am new to this forum...forgive me if the question that i am going to
>> raise
>> is already present. I dont have time to go through all the messages which
>> have been raised already.
>>
>> The problem is:
>> I have <logic:iterate id="ID1" name="formbeanname"
>> property="VectorInBean"
>> indexid="index">
>> <logic:equal name="ID1" property="index" value="Dynamic Value from the
>> bean">
>>
>> logic:equal tag's value attribute shoud get populated by a value from the
>> bean(i am storing the size of the vector in bean) which is used in the
>> logic:iterate. I dont want to use scriptlets.
>>
>> Actually the problem is the Vector in the bean has list of strings which
>> needs to be shown in the JSP one by one sepeared by "commas(,)" and we
>> need
>> to add "and" before the last string from the vector. So i need to check
>> it
>> dynamically whether the vector is reached the last but one.
>>
>> I need to solve this issue as soon as possible. Any help would be very
>> grateful.
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-pass-dynamic-value-to-the-logic%3Aequal-tag--tp17696748p17696748.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-pass-dynamic-value-to-the-logic%3Aequal-tag--tp17696748p17726580.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to pass dynamic value to the logic:equal tag?

Posted by Jim Kiley <jh...@summa-tech.com>.
I would compose the string from the vector in a Java function, and call that
function to get the String, instead of just accessing the Vector.  Is there
a reason you couldn't do that?

jk

On Fri, Jun 6, 2008 at 12:54 PM, VenkatBabu <bs...@yahoo.co.in> wrote:

>
> I am new to this forum...forgive me if the question that i am going to
> raise
> is already present. I dont have time to go through all the messages which
> have been raised already.
>
> The problem is:
> I have <logic:iterate id="ID1" name="formbeanname" property="VectorInBean"
> indexid="index">
> <logic:equal name="ID1" property="index" value="Dynamic Value from the
> bean">
>
> logic:equal tag's value attribute shoud get populated by a value from the
> bean(i am storing the size of the vector in bean) which is used in the
> logic:iterate. I dont want to use scriptlets.
>
> Actually the problem is the Vector in the bean has list of strings which
> needs to be shown in the JSP one by one sepeared by "commas(,)" and we need
> to add "and" before the last string from the vector. So i need to check it
> dynamically whether the vector is reached the last but one.
>
> I need to solve this issue as soon as possible. Any help would be very
> grateful.
> --
> View this message in context:
> http://www.nabble.com/How-to-pass-dynamic-value-to-the-logic%3Aequal-tag--tp17696748p17696748.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com