wood burning stoves 2.0*
The moose likes Struts and the fly likes logic: equal  question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic: equal  question" Watch "logic: equal  question" New topic
Author

logic: equal question

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,

I have used the logic equal tag in the following way:

<logic:equal name="noticeViewForm" property="postionValue" value="vectorSize">

but this does not seem to work.

when i try to do
<logic:equal name="noticeViewForm" property="postionValue" value="0">
it works.

But i need to check the value from the form. How can i do it?

Thanks in advance.

Anil
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134

Hi,

I have used the logic equal tag in the following way:

<logic:equal name="noticeViewForm" property="postionValue" value="vectorSize">

but this does not seem to work.

when i try to do
<logic:equal name="noticeViewForm" property="postionValue" value="0">
it works.

But i need to check the value from the form. How can i do it?

Thanks in advance.

Anil



Hi Anil,

Have you tried to put <bean:write > tag in the place of "vectorSize".

shankar


"Failure is not when you fall down; its only when you fail to get up again."
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi Shankar,

I cannot get it to compile when i replace with <bean:write>

Anil
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Hi Anil,

Looks like you want to use a dynamic value in the "value" attribute. You can use a JSP expression.

<logic:equal name="noticeViewForm" property="postionValue" value="<%=vectorSize%>">

Sheldon
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
hi anil

As sheldon adviced u can go for a jsp expression ..nad using <bean:wriet wont work as nested struts tags wont work in struts.............attributes should be an caluculated expression r it should be string
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi All,
Thanks for your advice.

I got it working by:

<jsp:useBean id="noticeViewForm" scope="request" class="bean.NoticeViewForm" />

and
<%
String vectorlength = noticeForm.getVectorSize().toString();
%>

and using this
<logic:equal name="noticeViewForm" property="postionValue" value="<%=vectorlength%>">

Thanks



Anil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic: equal question
 
Similar Threads
how to apply continue statement in struts logic:iterate tag
No equal tag error even when equal tag present in struts-logic.tld
logic equal syntax
How to replace a if(boolean) script with struts tag?
get list value using index in logic : iterate