Package org.joget.apps.datalist.model

Examples of org.joget.apps.datalist.model.DataListAction


     * Retrieve an action by class name.
     * @param className
     * @return
     */
    public DataListAction getAction(String className) {
        DataListAction action = null;
        try {
            action = (DataListAction) pluginManager.getPlugin(className);
        } catch (Exception ex) {
            LogUtil.error(DataListService.class.getName(), ex, "");
        }
View Full Code Here


           
            for (int i = 0; i < actions.length(); i++) {
                JSONObject action = actions.getJSONObject(i);
                if (action.has(PROPERTY_CLASS_NAME)) {
                    String className = action.getString(PROPERTY_CLASS_NAME);
                    DataListAction dataListAction = (DataListAction) loadPlugin(className);
                    if (dataListAction != null) {
                        dataListAction.setProperties(PropertyUtil.getPropertiesValueFromJson(action.getJSONObject(PROPERTY_PROPERTIES).toString()));
                        dataListAction.setProperty(PROPERTY_ID, action.getString(PROPERTY_ID));
                        property.add(dataListAction);
                    }
                }
            }
        }
View Full Code Here

           
            for (int i = 0; i < actions.length(); i++) {
                JSONObject action = actions.getJSONObject(i);
                if (action.has(PROPERTY_CLASS_NAME)) {
                    String className = action.getString(PROPERTY_CLASS_NAME);
                    DataListAction dataListAction = (DataListAction) loadPlugin(className);
                    if (dataListAction != null) {
                        dataListAction.setProperties(PropertyUtil.getPropertiesValueFromJson(action.getJSONObject(PROPERTY_PROPERTIES).toString()));
                        dataListAction.setProperty(PROPERTY_ID, action.getString(PROPERTY_ID));
                        property.add(dataListAction);
                    }
                }
            }
        }
View Full Code Here

        try {
            if (!obj.isNull(PROPERTY_ACTION) && !"".equals(obj.getString(PROPERTY_ACTION))) {
                JSONObject actionObj = obj.getJSONObject(PROPERTY_ACTION);
                if (actionObj.has(PROPERTY_CLASS_NAME)) {
                    String className = actionObj.getString(PROPERTY_CLASS_NAME);
                    DataListAction dataListAction = (DataListAction) loadPlugin(className);
                    if (dataListAction != null) {
                        dataListAction.setProperties(PropertyUtil.getPropertiesValueFromJson(actionObj.getJSONObject(PROPERTY_PROPERTIES).toString()));
                        return dataListAction;
                    }
                }
            }
        } catch (Exception e) {
View Full Code Here

                }
                if (column.has(PROPERTY_HIDDEN) && !column.isNull(PROPERTY_HIDDEN)) {
                    dataListColumn.setHidden(column.getBoolean(PROPERTY_HIDDEN));
                }
                if (column.has(PROPERTY_ACTION) && !column.isNull(PROPERTY_ACTION)) {
                    DataListAction action = parseActionFromJsonObject(column);
                    dataListColumn.setAction(action);
                }
                if (column.has(PROPERTY_FORMAT) && !column.isNull(PROPERTY_FORMAT)) {
                    Collection<DataListColumnFormat> formatCollection = new ArrayList<DataListColumnFormat>();
                    DataListColumnFormat format = parseFormatterFromJsonObject(column);
View Full Code Here

        if (renderHtml && text != null && !MediaTypeEnum.HTML.equals(tableModel.getMedia())) {
            text = StringUtil.stripAllHtmlTag(text);
        }

        // handle links
        DataListAction action = column.getAction();
        if (text != null && action != null && action.getHref() != null && action.getHref().trim().length() > 0 && MediaTypeEnum.HTML.equals(tableModel.getMedia())) {
            String href = action.getHref();
            String target = action.getTarget();
            String hrefParam = (action.getHrefParam() != null && action.getHrefParam().trim().length() > 0) ? action.getHrefParam() : "";
            String hrefColumn = (action.getHrefColumn() != null && action.getHrefColumn().trim().length() > 0) ? action.getHrefColumn() : "";
            String confirm = action.getConfirmation();
            String link = generateLink(href, target, hrefParam, hrefColumn, text.toString(), confirm);
            text = link;
        }

        return text;
View Full Code Here

TOP

Related Classes of org.joget.apps.datalist.model.DataListAction

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.