• 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 syntax

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
@1) see i was trying to compare value from bean write it is not working
if i simply put bean write i can see value can anybody tell me where i am going wrong, and if i hardcode value with for example 11 it works

<logic:equal name="idea" property="catid" value="<bean:write name='idea' . property='catid'/>">
@here in side #1@<bean:write name='idea' property='catid'/>
</logic:equal>
@2)
if i give single code around bean write it throws error like
(53,65) equal symbol expected

<logic:equal name="category" property="id" value='<bean:write name='idea' property='catid'/>/>
@here in side #2@
</logic:equal>
please do reply
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

<logic:equal name="category" property="id" value='<bean:write name='idea' property='catid'/>/>
@here in side #2@
</logic:equal>


For option 2, you are not closing the value attribute of the logic:equal tag, you need a ' to enclose the bean:write tag, though this may just change the error, not fix it.
For option 1, I'm not sure you can nest a bean:write inside a logic tag (could someone confirm this?). You could try something like

I also think your logic may be flawed, you seem to be asking if the catid of the idea bean is equal to itself. This will alway be true, and hence there is no point in doing the evaluation in the first place as you can just do a bean:write.
Hope this is of help...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic