Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Why can't I get object in request scope?

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm new in JSF and always got problem when using request scope bean, they seems can't be populated (or pass through) from POJO to JSF(jsp) page. This is what I did:
in faces-config.xml:



Then in one jsp file, I got a list of publications, when click the link of one link,

The control goes to viewPublication method in the bean, w/in webapp.action.ViewPublication class:


Then it navigate to viewPublicationDetails.jsp page
but in this page I get nothing from the bean, e.g.,
<h:outputText value="#{viewPublication.publication.title}"/>

or I tried
<h:outputText value="#{requestScope.viewPublication.publication.title}"/>

Any idea? Thanks
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The <redirect /> in the navigation rule cleans up the request scope.

--
Sergey : http://jsfTutorials.net
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic