I am having a problem where I am always getting a StalePageException,
whenever the ajax request is sent for an AbstractDefaultAjaxBehavior. The
url for the callback to the AbstractDefaultAjaxBehavior is stored in a
HiddenField. This value apparently has a stale page version number(I suspect
this is the reason for StalePageException). How do I avoid this problem. I
don't believe that the page is made stale by a refreshing of the page etc,
since the trigger for callBack() on client-side is the first action taken.
What could cause this issue and what is the best practice for storing the
callback URL for an AbstractDefaultAjaxBehavior? 

thanks in advance for any help. 

java code: 

            AbstractDefaultAjaxBehavior behaviorDisable = new
AbstractDefaultAjaxBehavior() { 
                      
               private static final long serialVersionUID = 1L; 

               protected void respond(final AjaxRequestTarget target) { 
              System.out.println("here"); 
            }   
                
        }; 
        
        form.add(behaviorDisable); 
        String callback =
String.valueOf((behaviorDisable.getCallbackUrl())); 
        HiddenField hiddenfield = new HiddenField("callBackUrl", new
Model(callback)); 
        form.add(hiddenfield); 


html: 

  <form wicket:id="form">
  
        <input type="hidden" wicket:id="callBackUrl" id="callBackUrl" />


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-tp4672323.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to