Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2590

AjaxLazyLoadPanel callback script rendering

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 1.4.4, 1.5-M1
    • wicket
    • None

    Description

      I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on
      document "onready" js event (triggered later by some client-side event, like
      click on some button). The way it is implemented right now, there is no way
      to override AjaxLazyLoadPanel & change callback handling script. It would be
      useful if instead of:

      =================================
      add(new AbstractDefaultAjaxBehavior() {
      ...
      @Override
      public void renderHead(IHeaderResponse response)

      { super.renderHead(response); response.renderOnDomReadyJavascript(getCallbackScript().toString()); }

      ...
      }
      =================================

      it would be a protected method which would do the same thing:

      =================================
      add(new AbstractDefaultAjaxBehavior() {
      ...
      @Override
      public void renderHead(final IHeaderResponse response)

      { super.renderHead(response); handleCallbackScript(response, getCallbackScript().toString()); }


      ...
      }

      protected void handleCallbackScript(final IHeaderResponse response, final
      String callbackScript) {
      response.renderOnDomReadyJavascript(callbackScript);
      }
      =================================

      Attachments

        Activity

          People

            jdonnerstag Juegen Donnerstag
            alexandru.objelean Alexandru Objelean
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: