• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

logic: equal question

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shankar,

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

Anil
 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic