• Post Reply Bookmark Topic Watch Topic
  • New Topic

Capturing initial view instance in restore view phase

 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!