aspose file tools*
The moose likes JSF and the fly likes session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "session bean" Watch "session bean" New topic
Author

session bean

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Hi guys,

Could somone please post a code sample/instrcutions or a link to how I would access a session object in my JSF bean.

Thanks
Zein
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
To get the session object:


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Thank you for your reply Richard

I'd just like to post the following link, on sessions, variables, backking beans etc. link

Regards
Zein
RanjithRaj DhanaSekar
Greenhorn

Joined: Aug 11, 2010
Posts: 3
Hi guys... I rearly sufferd with getting jsf frame work handled bean object refernce. But i got the solution. Hope it will usefull to all.
To get that reference object you have to manitain the <managed-bean> as applicaton scope


public class Report {

Report report;
int count;

public void updateCount()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
Application app = facesContext.getApplication();
ValueBinding vlBinding = app.createValueBinding("#{report}");
Report uObj = (Report) vlBinding.getValue(facesContext);
uObj.setCount(uObj.getCount() + 1);
}
}

Can send feedback to ranjithraj.d@gmail.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session bean
 
Similar Threads
isIdentical
Amusing...
Session Facade vs Session Bean
Different Managed Bean instances
how to handle session in EJB