This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a function in a bean where the bean name is on another bean as a parameter

 
Liron Golan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i call a function in a bean where the bean name is a parameter on another bean.
Something like this (This doesn't work):

#{#{bean1.getBeanName}.functionCall}

Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't "call a function on a bean", but you can invoke getters/setters and action processors indirectly. It's actually quite simple:

#{bean1.beanName.functionCall}

If you had a property named "beanName" in bean1 which was itself a bean with a property or action method named "functionCall", the preceeding code would invoke it. It's all part of the Expression Language (EL).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic