hi erik, 

actually the example in my first post already calls the behaviour:
function callWicket() {
   var wcall = wicketAjaxGet('${url}' + addToUrl, function() { }, function()
{ }); // addToUrl are optional parameters
} 

the addToUrl variable above may look like that '&foo=bar' - so you can get
the get parameters out of the request. It actually _is_ quite ugly, but you
get them like so: Map map =
((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap();
Maybe there's also an easier way but I'm not really into wicket's
requestcycle ...

I saw this approach (JS-template + AbstractDefaultAjaxBehavior) in the
wicketstuff-push project that was done by Xavier Hanin and Vincent Demant.
If you want to see it in production check it out from SVN and take a look at
the org.wicketstuff.push.cometd package. There's a JS-template and the class
that uses it (CometdBehavior). 

regards, 

Michael

Erik van Oosten-3 wrote:
> 
> Nice to see a more structured approach.
> 
> Do you have a small JavaScript example that shows how to call the 
> behavior URL?
> 
> Can you also explain (or reference docs/examples) how to pass parameters 
> from javascript to the behavior?
> 
> Regards,
>      Erik.
> 
> 
> Michael Sparer wrote:
>> hi, 
>>
>> - your component has to implement IHeaderContributor, that's where the
>> response-object gets passed.....
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Javascript-call-to-wicket-tp14685384p14696846.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to