File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic: equal question

 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shankar,

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

Anil
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 415
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 137
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic