Something like this might work:
public class GenericTailJavaScriptBehavior extends AbstractBehavior {
private final String javaScript;
/**
* @param javaScript
*/
public GenericTailJavaScriptBehavior(String javaScript) {
this.javaScript = javaScript;
}
/**
* @see
org.apache.wicket.behavior.AbstractBehavior#onRendered(org.apache.wicket.Component)
*/
@Override
public void onRendered(Component component) {
super.onRendered(component);
JavascriptUtils.writeOpenTag(component.getResponse());
component.getResponse().write(javaScript);
JavascriptUtils.writeCloseTag(component.getResponse());
}
}
2010/3/6 marioosh.net <[email protected]>:
> How to force wicket to generate javascript at the end of html, not inline ?
> I'm using SortableListView and addContainment method, but containtment
> option doesn't work.
>
> I think not work because of that "important note" - from scriptaculous docs: "
> containment
> Enables dragging and dropping between Sortables. Takes an array of
> elements or element-ids (of the containers). Important note: To ensure
> that two way dragging between containers is possible, place all
> Sortable.create calls after the container elements."
>
> --
> Greetings,
> marioosh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]