• 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

Capturing initial view instance in restore view phase

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Below is the scenario:

Initially,if I click on a command link that displays a pop up(using java script in the onclick event) below are the phases that get executed.
RESTORE_VIEW(1)
RENDER_RESPONSE(6)


I can understand this, because this is the first time the page is accessed and hence no other phases will be executed.

Now I close the popup and again click the link, popup appears again and below is the log from PhaseListener

RESTORE_VIEW(1)
APPLY_REQUEST_VALUES(2)
PROCESS_VALIDATIONS(3)
UPDATE_MODEL_VALUES(4)
INVOKE_APPLICATION(5)
RENDER_RESPONSE(6)


Now, from the phase listener I want to distinguish between these 2 by finding out if the request for page is already the one that
the user accessed before.
For sure, there will be some JSF object where this information is stored, but I am not able to find it.

I had a look at FacesContext, ApplicationImpl, ViewRoot but could not get the place where the PREVIOUS view id is stored.

Regards,
Joshua
reply
    Bookmark Topic Watch Topic
  • New Topic