• 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

About javax.faces.context.Flash

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the API of javax.faces.context.Flash (https://docs.oracle.com/javaee/7/api/javax/faces/context/Flash.html), it says:


 First page

   <h:button id="nextButton" value="Next (button)" outcome="next.xhtml">
     <f:param name="foo" value="bar"/>
   </h:button>

   Next page

   <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:f="http://xmlns.jcp.org/jsf/core"
         xmlns:h="http://xmlns.jcp.org/jsf/html">
   <f:metadata>
     <f:viewParam name="foo" id="foo" value="#{flash.now.foo}" />
   </f:metadata>
   <head /><body>
   foo = #{flash.foo}
   </body>
   </html>



I think the Next page should have instead.
When I ran this Next page, it does not print #{flash.foo} on the screen.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that this statement:

sets up #{flash.foo} from #{flash.now.foo}
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But the problem is that in the Next.xhtml, bar = #{flash.foo} does not do anything.
I have to put bar = #{flash.now.foo} to make it work.
 
reply
    Bookmark Topic Watch Topic
  • New Topic