Joseph Pachod <jp <at> thomas-daily.de> writes: > When trying to reach this goal, I tried to run the init call through an > header contributor, but the call is then done before my content is put > on the page, making it useless: > public abstract class AbstractEditBehavior extends AbstractBehavior > { > public AbstractEditBehavior(final AbstractTextComponent<?> component) > { > component.add(JQueryDependency.CORE); > component.add(new HeaderContributor(new IHeaderContributor() > { > public void renderHead(final IHeaderResponse response) > { > if ((AjaxRequestTarget.get() != null)) > { > response.renderJavascript("jQuery.initEdit();", "ID" > + response.hashCode()); > } > } > })); > > } > (...)
Hi Joseph, have you tried invoking AjaxRequestTarget's method appendJavascript? Inside if statement try to write AjaxRequestTarget.get().appendJavascript("jQuery.initEdit();"); I had a similar problem some weeks ago and it worked. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org