This content has been marked as final.
Show 3 replies
-
1. Re: How to detect if a request is a ajax submit or normal su
nbelaevski Sep 17, 2009 5:23 AM (in response to rigolissimo)Hi,
Use check AjaxContext class. -
2. Re: How to detect if a request is a ajax submit or normal su
rigolissimo Sep 17, 2009 10:59 AM (in response to rigolissimo)Thanks Nbelaevski. Gives me an idea, but can't say I immediately stumbled while googling on something applicable to my case, with my limited knowledge.
How do I access the AjaxContext from my afterPhase() method in my standard PhaseListener?
Sample:
public class LoginListener implements PhaseListener {
[...]
public void afterPhase(PhaseEvent event) {
if (event.getPhaseId() != PhaseId.RESTORE_VIEW)
return;
log.debug("Entering login afterPhase()");
FacesContext fc = event.getFacesContext();
ExternalContext ec = fc.getExternalContext();
HttpServletRequest req = (HttpServletRequest)ec.getRequest();