This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need to invoke a java function by passing a parameter  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!