title: How to pass JSON from wicket to JavaScript?
body: <p>I have the following function in java script page that call wicket ajax:</p>
  
  <pre><code>function callWicketPage() {  
                  wicketAjaxGet(
                  urlCallback,
                  function() {alert('success'); },
                  function() { alert('failed');
                  }); 
              }
  </code></pre>
  
  <p>and in the wicket page I do the following:</p>
  
  <pre><code>   final AbstractDefaultAjaxBehavior behave = new AbstractDefaultAjaxBehavior() { 
      @Override
      public void renderHead(IHeaderResponse ihr) {
          super.renderHead(ihr);
          ihr.renderJavascript("var urlCallback = '" + this.getCallbackUrl() + "';", "insertedjavascript");
      } 
          protected void respond(final AjaxRequestTarget target) { 
          }
      };
      add(behave);
  </code></pre>
  
  <p>What i want is to send back a json response from the wicket page to JavaScript, How could i do it \?</p>