Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need to invoke a java function by passing a parameter

 
ganta gopal
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have scriptlet that actually invokes a java functions by passing an argument.
I want to replace the scriplet with a struts2 tag.
I know that i can invoke a method like this way ex:<s:property value="display()"/> where display() is a method from an object which is in the valuestack.
how can i pass an argument(not hardcoded constant) to the display() function.
Can i have something like <s:property value="display('<s:property value="getName()"/>')"/>

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you can't arbitrarily nest custom tags.

OGNL expressions may contain anything, however, like "display(name)". The OGNL documentation may be of interest.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic