use of com.servoy.j2db.persistence.Form in project servoy-client by Servoy.
the class DataRenderer method onDrop.
public boolean onDrop(JSDNDEvent event) {
Form form = dragNdropController.getForm();
int onDropID = form.getOnDropMethodID();
if (onDropID > 0) {
// $NON-NLS-1$
Object dropHappened = dragNdropController.executeFunction(Integer.toString(onDropID), new Object[] { event }, false, null, false, "onDropMethodID");
if (dropHappened instanceof Boolean)
return ((Boolean) dropHappened).booleanValue();
}
return false;
}
use of com.servoy.j2db.persistence.Form in project servoy-client by Servoy.
the class FormLookupPanel method getDefaultSort.
public List<SortColumn> getDefaultSort() {
if (defaultSort == null) {
try {
FormController fc = getFormPanel();
if (fc != null) {
Form f = fc.getForm();
defaultSort = ((FoundSetManager) application.getFoundSetManager()).getSortColumns(f.getDataSource(), f.getInitialSort());
}
} catch (RepositoryException e) {
Debug.error(e);
defaultSort = new ArrayList<SortColumn>(1);
}
}
return defaultSort;
}
use of com.servoy.j2db.persistence.Form in project servoy-client by Servoy.
the class ScrollResponseHeaderContainer method initDragNDrop.
public void initDragNDrop(FormController formController, int clientDesignYOffset) {
this.yOffset = clientDesignYOffset;
boolean enableDragDrop = false;
if (cellview instanceof Portal) {
Portal cellviewPortal = (Portal) cellview;
enableDragDrop = (cellviewPortal.getOnDragMethodID() > 0 || cellviewPortal.getOnDragEndMethodID() > 0 || cellviewPortal.getOnDragOverMethodID() > 0 || cellviewPortal.getOnDropMethodID() > 0);
} else {
Form form = formController.getForm();
enableDragDrop = (form.getOnDragMethodID() > 0 || form.getOnDragEndMethodID() > 0 || form.getOnDragOverMethodID() > 0 || form.getOnDropMethodID() > 0);
}
if (enableDragDrop) {
dragNdropController = formController;
addDragNDropBehavior();
}
}
use of com.servoy.j2db.persistence.Form in project servoy-client by Servoy.
the class WebDataRenderer method onDrag.
public int onDrag(JSDNDEvent event) {
Form form = dragNdropController.getForm();
int onDragID = form.getOnDragMethodID();
if (onDragID > 0) {
// $NON-NLS-1$
Object dragReturn = dragNdropController.executeFunction(Integer.toString(onDragID), new Object[] { event }, false, null, false, "onDragMethodID");
if (dragReturn instanceof Number)
return ((Number) dragReturn).intValue();
}
return DRAGNDROP.NONE;
}
use of com.servoy.j2db.persistence.Form in project servoy-client by Servoy.
the class WebDataRenderer method onDragEnd.
public void onDragEnd(JSDNDEvent event) {
Form form = dragNdropController.getForm();
int onDragEndID = form.getOnDragEndMethodID();
if (onDragEndID > 0) {
// $NON-NLS-1$
dragNdropController.executeFunction(Integer.toString(onDragEndID), new Object[] { event }, false, null, false, "onDragEndMethodID");
}
}
Aggregations