Package org.joget.apps.form.model

Examples of org.joget.apps.form.model.FormLoadBinder


                childElements = new ArrayList<Element>();
            }
            element.setChildren(childElements);

            // set binders and properties
            FormLoadBinder loadBinder = (FormLoadBinder) FormUtil.parseBinderFromJsonObject(obj, FormBinder.FORM_LOAD_BINDER);
            element.setLoadBinder(loadBinder);
            FormLoadBinder optionsBinder = (FormLoadBinder) FormUtil.parseBinderFromJsonObject(obj, FormBinder.FORM_OPTIONS_BINDER);
            element.setOptionsBinder(optionsBinder);
            FormStoreBinder storeBinder = (FormStoreBinder) FormUtil.parseBinderFromJsonObject(obj, FormBinder.FORM_STORE_BINDER);
            element.setStoreBinder(storeBinder);

            // set validator
View Full Code Here


     */
    public static FormData executeOptionBinders(Element element, FormData formData) {
        if (formData == null) {
            formData = new FormData();
        }
        FormLoadBinder binder = (FormLoadBinder) element.getOptionsBinder();
        String primaryKeyValue = (formData != null) ? element.getPrimaryKeyValue(formData) : null;
        if (binder != null && !isAjaxOptionsSupported(element, formData)) {
            FormRowSet data = binder.load(element, primaryKeyValue, formData);
            if (data != null) {
                formData.setOptionsBinderData(binder, data);
            }
        }
        Collection<Element> children = element.getChildren(formData);
View Full Code Here

     */
    public static FormData executeLoadBinders(Element element, FormData formData) {
        if (formData == null) {
            formData = new FormData();
        }
        FormLoadBinder binder = (FormLoadBinder) element.getLoadBinder();
        String primaryKeyValue = (formData != null) ? element.getPrimaryKeyValue(formData) : null;
        if (!(element instanceof AbstractSubForm) && binder != null) {
            FormRowSet data = binder.load(element, primaryKeyValue, formData);
            if (data != null) {
                formData.setLoadBinderData(binder, data);
            }
        }
        Collection<Element> children = element.getChildren(formData);
View Full Code Here

     * Utility method to recursively find the nearest ancestor load binder for an element.
     * @param element
     * @return
     */
    public static FormLoadBinder findLoadBinder(Element element) {
        FormLoadBinder binder = null;
        Element el = element;
        while (el != null && binder == null) {
            binder = el.getLoadBinder();
            if (binder != null) {
                break;
View Full Code Here

     * Utility method to recursively find the nearest ancestor options binder for an element.
     * @param element
     * @return
     */
    public static FormLoadBinder findOptionsBinder(Element element) {
        FormLoadBinder binder = null;
        Element el = element;
        while (el != null && binder == null) {
            binder = el.getOptionsBinder();
            if (binder != null) {
                break;
View Full Code Here

    }
   
    protected static void recursiveLoadFormData(String appId, String appVersion, Element e, Map<String, Object> data, FormData formData, boolean includeSubformData, boolean includeReferenceElements, boolean flatten, WorkflowAssignment assignment, int currentDepth) {
        boolean recursive = currentDepth == 0 || includeSubformData;
        Map<String, Object> result = data;
        FormLoadBinder loadBinder = e.getLoadBinder();
        FormLoadBinder optionsBinder = e.getOptionsBinder();
        if (loadBinder != null) {
            if (recursive) {
                // load form data
                FormRowSet rowSet = formData.getLoadBinderData(e);
                if (rowSet != null && !rowSet.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.joget.apps.form.model.FormLoadBinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.