Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting bean from request scope  RSS feed

 
Rehana Shaik
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When i tried to get bean from request as i done in my Option1 it was getting values. but when i tried like my Option2 i am getting a string object rather than a class object.

Option1
fc.getApplication().createValueBinding("#{testBean}").getValue(fc)

option 2
beanName="\"#{"+beanName+"}\"";
fc.getApplication().createValueBinding(beanName).getValue(fc)

with the second option i am just getting a String object with the enitre package structure.
according to my requirements i have to use option2 kind of thing to know dynamically which bean is in request and process it.

Any one has any ideas what is going wrong here.

thanks in advance
 
Chad Louis
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be:

beanName = "#{" + beanName + "}";

you want your resulting value of beanName to be:

#{testBean}

not

"#{testBean}"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!