• 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

Struts: logic tags on non-bean entities (Strings).

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy. As usual, I figured out one problem only to run into another.

Is there anyway I can use "logic:equal" to compare two Strings in a .jsp page?

I'd like to use it to see if a parameter that I'm passing to a tile has a certain value.

I've been trying logic:equal paramater ="tiles:get name='myParamater'" value ="myTestValue", but that hasn't been working. I've also tried getAsString with the same results.

Anyone have any ideas? Is there a way I could use some inpage Java to solve this? (Since I can't assign anything dynamically, I don't really think so though).
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Karl,
You could use bean efine to get the first string in a bean.
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the only solution then to actually create a bean for which to test? Methinks the logic tag could do with an upgrade.

Thanks for the response, I'll give that a try.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic