aspose file tools
The moose likes JSF and the fly likes Getting bean from request scope Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Getting bean from request scope" Watch "Getting bean from request scope" New topic
Author

Getting bean from request scope

Rehana Shaik
Ranch Hand

Joined: Jan 03, 2003
Posts: 33
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

Joined: Sep 29, 2005
Posts: 1
It should be:

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

you want your resulting value of beanName to be:

#{testBean}

not

"#{testBean}"
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Getting bean from request scope
 
Similar Threads
ReferenceSyntaxException
Getting the selected drop down value in the next page
Strange Problem ! View Object .execute query returns 0
Save POI Excel file in JSF
How do I read a session variable inside a Managed Bean?