JSFunction function = new JSFunction("new DnD.SimpleDraggable");
function.addParameter(component.getParent().getClientId(context));
RendererContributor contributor = DraggableRendererContributor.getInstance();
ScriptOptions dragOptions = contributor.buildOptions(context, component);
DnDParametersEncoder parametersEncoder = DnDParametersEncoder.getInstance();
dragOptions.addOption("dndParams", parametersEncoder.doEncodeAsString(context, component));
function.addParameter(dragOptions);
function.appendScript(buffer);
String scriptContribution = contributor.getScriptContribution(context, component);