<p>I'm wrapping up a <code>Javascript</code> widget in a <code>Wicket</code> component.  I want to let the JS side talk to the component.  What I've got so far:</p>

<p>Component in question goes like</p>

<pre><code>talker = new GridAjaxBehavior();
this.add(talker);    
</code></pre>

<p>in constructor</p>

<p>and then, later on, puts something like</p>

<pre><code>"var MyGridTalker = new talker(" + this.talker.getCallbackUrl() + ");";
</code></pre>

<p>into the JS.</p>

<p>where <code>GridAjaxBehavior</code> extends <code>AbstractDefaultAjaxBehavior</code>.  I want GridAjaxBehavior to spit back some XML when the JS calls it.  </p>

<p>Am I doing this the right way?  What should GridAjaxBehaviour do to spit back the XML?</p>

<p>Thanks</p>

I don't really know what Wicket is or what it does, but there is a minor bug in your code (as it appears).
This:
```
"var MyGridTalker = new talker(" + this.talker.getCallbackUrl();
```
You seem to be missing your end parens:
```
"var MyGridTalker = new talker(" + this.talker.getCallbackUrl() + ")";
```
Anyway, not a big deal, but didn't know if it was intentional.