};
}
public ScriptOptions buildOptions(FacesContext context, UIComponent component) {
if (component instanceof Draggable) {
Draggable draggable = (Draggable) component;
DraggableOptions options = new DraggableOptions(draggable);
Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
Map parameters = (Map) eventOptions.get("parameters");
if (parameters == null) {
parameters = new HashMap();
}
String clientId = component.getClientId(context);
parameters.put(DRAG_SOURCE_ID, clientId);
options.addOption("parameters", parameters);
String indicatorId = draggable.getResolvedDragIndicator(context);
if (indicatorId == null) {
String simpleId = draggable.getDragIndicator();
if (simpleId != null) {
UIComponent indicator = RendererUtils.getInstance().findComponentFor(component, simpleId);
if (indicator != null) {
indicatorId = indicator.getClientId(context);
}