0

I have problem in using JSF ajax, I have command link like below :

<h:form id="form1">                                                      
    <h:commandLink value="#{bean.title}">  
      <f:ajax render=":form1:details" listener="#{bean.populateDetails}"/>
      <f:param value="123" name="paramValue"/> 
    </h:commandLink>
    <h:panelGroup id="details"> 
       ....
    </h:panelGroup> 
</h:form>   

and the backing bean method like below :

public class BackingBean extends PageCodeBase implements Serializable{

.....

  public void populateDetails(AjaxBehaviorEvent ae){        
    logger.info("Inside Ajax call");
    String param = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("paramValue");
    logger.info("paramValue = " + param );
  }
.....

}   

the problem is that whenever I click the commandLink without any wait or delay I got ViewExpiredException in the log and the listener method not called , and rarely it works and call the listener , I cannot catch the issue.

Note: this is a JSF portlet Application deployed on IBM Portal

I have checked many questions here but did not find any answer to solve my issue

George
  • 95
  • 1
  • 2
  • 14
  • None of these: https://www.google.com/search?q=ajax+viewexpiredexception+stackoverflow had any useful info? Not even http://stackoverflow.com/questions/11203195/session-timeout-and-viewexpiredexception-handling-on-jsf-primefaces-ajax-request? – Kukeltje Jan 19 '17 at 19:42
  • or do you mean you **always** get a ViewExpiredException? (I then misunderstood your question initially). If so does it work outside a portlet? – Kukeltje Jan 19 '17 at 19:46
  • Thanks @Kukeltje , I have already checked these questions, most of them are talking about handling exception or go to error page, but this will not solve the issue, still i don't know the root cause , I did not test outside portlet – George Jan 20 '17 at 06:58

0 Answers0