Figured it out.... Basically no need to use AjaxLink since I have to
construct the javascript redirect manually.
I ended up doing this:
chart.setOnClick("window.location='" + RequestCycle.get().urlFor(new
CarPage(make, model, year)) + "'");
mallet wrote:
>
> I am trying to embed javascript links in some JSON which I pass to Open
> Flash Chart. I am able to test this by giving the "on-click" attribute of
> a
> chart element the value of "alert('testing')" and it pops up the alert as
> I
> expect. Now I need to create links to a Wicket page. All the links will
> go
> to the same page but I need to have different parameters depending on
> which
> element of my chart was clicked.
>
> I tried something like this but got null for the markup stream:
>
> AjaxLink lateLink = new AjaxLink ("late") {
> public void onClick(AjaxRequestTarget target) {
> setResponsePage(new CarPage(make, model, year));
> return;
> }
> };
> chart.setOnClick(lateLink.getMarkupStream());
>
> How can I go about building a dynamic javascript link to a wicket page
> which
> I can pass into the flash object? The chart object is just a bean which I
> run through a converter to seralizize its attributes to JSON.
>
> Thanks for any help.
>
>
--
View this message in context:
http://www.nabble.com/Retrieving-serializing-the-javascript-for-an-AjaxLink-tp23047799p23048696.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]