i have traced the wicket source codes at the place that how it generates the ajax js like wcall=wicketAjaxGet('xxx') but i don't know exactly what this does, so how to "add parameter" to the wicket ajax request?
i can add custom js to the wicket ajax javascript, but how can I pass the some dynamic js state into that ajax request, e.g. i trigger the ajax request by a link with AjaxEventBehavior on onclick event. would you mind show me a simple example? David Bernard-2 wrote: > > For a similar case, I override (in MyBehavior) > @Override > public final void respond(AjaxRequestTarget target) { > try { > Request req = RequestCycle.get().getRequest(); > String param1 = req.getParameter("param1"); > // to stuff > super.respond(target); //?? > } catch (RuntimeException exc) { > throw exc; > } catch (Exception exc) { > throw new RuntimeException("wrap: " + exc.getMessage(), exc); > } > } > > And you need to override (server or client side) the callbackUrl to add > parameter. > > > > ywtsang wrote: >> How to pass information (stored in an attribute of a html tag, or >> javascript >> variable) through ajax without involving form? >> >> e.g. there is an ajax link and after I click this ajax link, an ajax >> event >> is triggered and I want to get the states of other html >> elements/javascript >> states in this ajax event >> >> it is no problem to use form, but we have a restriction that no form is >> used >> (may look weird to all here), so I would like to see if there is >> workaround >> in wicket. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/pass-information-through-ajax-without-form-tf4560660.html#a13016592 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]