Examples of FBFormItem


Examples of org.jbpm.formapi.client.form.FBFormItem

    }
   
    @Override
    public FBFormItem buildWidget() {
        try {
            FBFormItem item = FBFormItem.createItem(representation);
            return build(item);
        } catch (FormBuilderException e) {
            return new ErrorMenuItem(e.getLocalizedMessage()).buildWidget();
        }
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    public TreePresenter(TreeView treeView) {
        this.view = treeView;
        bus.addHandler(FormItemRemovedEvent.TYPE, new FormItemRemovedHandler() {
            @Override
            public void onEvent(FormItemRemovedEvent event) {
                FBFormItem item = event.getFormItem();
                view.removeFormItem(item);
            }
        });
        bus.addHandler(FormItemAddedEvent.TYPE, new FormItemAddedHandler() {
            @Override
            public void onEvent(FormItemAddedEvent event) {
                FBFormItem item = event.getFormItem();
                Widget parent = event.getFormItemHolder();
                FBCompositeItem parentItem = null;
                while (parent != null && parentItem == null) {
                    if (parent instanceof FBCompositeItem) {
                        parentItem = (FBCompositeItem) parent;
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    @Override
    public FormItemRepresentation getRepresentation() {
        LoopBlockRepresentation rep = getRepresentation(new LoopBlockRepresentation());
        rep.setInputName(getInput() == null ? null : getInput().getName());
        FBFormItem loopItem = (FBFormItem) this.loopBlock.getWidget();
        if (loopItem != null) {
            rep.setLoopBlock(loopItem.getRepresentation());
        }
        rep.setVariableName(this.variableName);
        return rep;
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

            InputData input = new InputData();
            input.setName(lrep.getInputName());
            lrep.setInput(input);
        }
        if (lrep.getLoopBlock() != null) {
            FBFormItem child = super.createItem(lrep.getLoopBlock());
            this.loopBlock.add(child);
        }
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    }
   
    @Override
    public FBFormItem cloneItem() {
        LoopBlockFormItem clone = super.cloneItem(new LoopBlockFormItem(getFormEffects()));
        FBFormItem loopItem = (FBFormItem) this.loopBlock.getWidget();
        clone.add(loopItem);
        clone.variableName = this.variableName;
        return clone;
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    }

    @Override
    public Widget cloneDisplay(Map<String, Object> data) {
        FlowPanel display = new FlowPanel();
        FBFormItem subItem = (FBFormItem) loopBlock.getWidget();
        Object input = getInputValue(data);
        String inputName = getInput() == null ? null : getInput().getName();
        if (subItem != null && input != null && inputName != null) {
            Map<String, Object> subData = new HashMap<String, Object>();
            if (input.getClass().isArray()) {
                Object[] arr = (Object[]) input;
                for (Object obj : arr) {
                    subData.put(inputName, obj);
                    display.add(subItem.cloneDisplay(subData));
                }
            } else if (input instanceof Collection) {
                Collection<?> col = (Collection<?>) input;
                for (Object obj : col) {
                    subData.put(inputName, obj);
                    display.add(subItem.cloneDisplay(subData));
                }
            } else if (input instanceof Map) {
                Map<?,?> map = (Map<?,?>) input;
                for (Object obj : map.entrySet()) {
                    subData.put(inputName, obj);
                    display.add(subItem.cloneDisplay(subData));
                }
            }
        }
        display.setSize(getWidth(), getHeight());
        super.populateActions(display.getElement());
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        grid.insertRow(beforeRowNumber);
        this.rows++;
    }
   
    public void insertRowElements(int rowNumber, List<FBFormItem> rowItems) {
        FBFormItem prevItem = null;
        for (int i = rowNumber - 1; i > 0 && prevItem == null; i--) {
            for (int j = grid.getColumnCount(); j > 0 && prevItem == null; j--) {
                Widget widget = grid.getWidget(i, j);
                if (widget != null && widget instanceof FBFormItem) {
                    prevItem = (FBFormItem) widget;
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

    }
   
    public void insertColumnElements(int colNumber, List<FBFormItem> columnItems) {
        int rowNumber = 0;
        for (FBFormItem newItem : columnItems) {
            FBFormItem prevItem = null;
            for (int i = grid.getRowCount(); i > 0 && prevItem == null; i--) {
                for (int j = colNumber - 1; j > 0 && prevItem == null; j--) {
                    Widget widget = grid.getWidget(i, j);
                    if (widget != null && widget instanceof FBFormItem) {
                        prevItem = (FBFormItem) widget;
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

        for (int index = 0; index < this.columns * this.rows; index++) {
            int column = index%this.columns;
            int row = index/this.columns;
            Widget widget = grid.getWidget(row, column);
            if (widget != null && widget instanceof FBFormItem) {
                FBFormItem item = (FBFormItem) widget;
                FormItemRepresentation subRep = item.getRepresentation();
                rep.setElement(row, column, subRep);
            }
        }
        return rep;
    }
View Full Code Here

Examples of org.jbpm.formapi.client.form.FBFormItem

            for (int rowindex = 0; rowindex < trep.getElements().size(); rowindex++) {
                List<FormItemRepresentation> row = trep.getElements().get(rowindex);
                if(row != null) {
                    for (int cellindex = 0; cellindex < row.size(); cellindex++) {
                        FormItemRepresentation cell = row.get(cellindex);
                        FBFormItem subItem = super.createItem(cell);
                        this.grid.setWidget(rowindex, cellindex, subItem);
                        super.add(subItem);
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.