• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

session bean

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To get the session object:
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply Richard

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

Regards
Zein
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic