src/main/java/org/efaps/ui/wicket/behaviors/dojo/DnDBehavior.java
@Override
    public void renderHead(final Component _component,
                           final IHeaderResponse _response)
    {
        super.renderHead(_component, _response);
        _response.render(RequireHeaderItem.forClasses(DojoClasses.DnDSource, DojoClasses.parser));


        if (this.type == DnDBehavior.BehaviorType.SOURCE) {
            final StringBuilder js = new StringBuilder()
                .append("var nSrc = new dojo.dnd.Source(dom.byId('").append(_component.getMarkupId(true)).append("'),")
                .append("{ accept: ['" + this.dndType + "']});")
                .append(" aspect.after(nSrc,\"onDrop\", function(){\n")
                .append(this.appendJavaScript)
                .append("\n});");
            _response.render(OnDojoReadyHeaderItem.forScript(DojoWrapper.require(js, DojoClasses.aspect,
                            DojoClasses.dom, DojoClasses.DnDSource)));
        }
    }
@Override
    public void renderHead(final Component _component,
                           final IHeaderResponse _response)
    {
        super.renderHead(_component, _response);
        _response.render(RequireHeaderItem.forClasses(DojoClasses.DnDSource, DojoClasses.parser));


        if (this.type == DnDBehavior.BehaviorType.SOURCE) {
            final StringBuilder js = new StringBuilder()
                .append("var nSrc = new dojo.dnd.Source(dom.byId('").append(_component.getMarkupId(true)).append("'),")
                .append("{ accept: ['" + this.dndType + "']});")
                .append(" aspect.after(nSrc,\"onDrop\", function(){\n")
                .append(this.appendJavaScript)
                .append("\n});");
            _response.render(OnDojoReadyHeaderItem.forScript(DojoWrapper.require(js, DojoClasses.aspect,
                            DojoClasses.dom, DojoClasses.DnDSource)));
        }
    }
Add the javascriupt to the head of the webpage.

@see org.efaps.ui.wicket.behaviors.dojo.AbstractDojoBehavior#renderHead(
org.apache.wicket.markup.html.IHeaderResponse)

@param _component component the header will be rendered for
@param _response rseponse