aspose file tools *
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
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
 
Consider Paul's rocket mass heater.
 
subject: logic: equal question