Github user dashorst commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/151#discussion_r52115636
  
    --- Diff: 
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxLazyLoadPanel.java
 ---
    @@ -139,56 +182,176 @@ protected void handleCallbackScript(final 
IHeaderResponse response,
        @Override
        protected void onBeforeRender()
        {
    -           if (state == 0)
    +           if (state == LoadingState.WAITING_FOR_LAZY_COMPONENT)
                {
                        add(getLoadingComponent(LAZY_LOAD_COMPONENT_ID));
    -                   setState((byte)1);
    +                   setState(LoadingState.REPLACING_LAZY_COMPONENT);
                }
                super.onBeforeRender();
        }
     
    +   @Override
    +   public void onEvent(IEvent<?> event)
    +   {
    +           super.onEvent(event);
    +
    +           if (state == LoadingState.REPLACING_LAZY_COMPONENT)
    --- End diff --
    
    No, as `isReadyForReplacement()` is actually there for preventing 
replacement prematurely. Why would you wait until some time in the future to do 
the replacement when you can replace now and the component is ready for 
replacement?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to