Package org.jbpm.formapi.shared.api

Examples of org.jbpm.formapi.shared.api.InputData


                tableOfInputs.setElement(index, 0, labelName);
                LabelRepresentation labelValue = new LabelRepresentation();
                labelValue.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelValue.setEffectClasses(labelEffects);
                labelValue.setWidth("200px");
                InputData data = new InputData();
                data.setName(input.getName());
                data.setValue(input.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
                    public Map<String, Object> getDataMap() {
                        return new HashMap<String, Object>();
                    }
                });
                labelValue.setInput(data);
                labelValue.setValue("{variable}");
                tableOfInputs.setElement(index, 1, labelValue);
            }
            LabelRepresentation labelInputs = new LabelRepresentation();
            labelInputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
            labelInputs.setEffectClasses(labelEffects);
            labelInputs.setValue("Inputs:");
            form.addFormItem(labelInputs);
            form.addFormItem(tableOfInputs);
        }
        List<TaskPropertyRef> outputs = task.getOutputs();
        if (outputs != null && !outputs.isEmpty()) {
            TableRepresentation tableOfOutputs = new TableRepresentation();
            tableOfOutputs.setRows(outputs.size());
            tableOfOutputs.setColumns(2);
            tableOfOutputs.setHeight("" + (outputs.size() * 30) + "px");
            tableOfOutputs.setEffectClasses(tableEffects);
            tableOfOutputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
            for (int index = 0; index < outputs.size(); index++) {
                TaskPropertyRef output = outputs.get(index);
                LabelRepresentation labelName = new LabelRepresentation();
                labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelName.setEffectClasses(labelEffects);
                labelName.setValue(output.getName());
                labelName.setWidth("100px");
                tableOfOutputs.setElement(index, 0, labelName);
                TextFieldRepresentation textField = new TextFieldRepresentation();
                textField.setEventActions(asMapOfNull(textfieldActions, FBScript.class));
                textField.setWidth("200px");
                textField.setEffectClasses(textfieldEffects);
                OutputData data = new OutputData();
                data.setName(output.getName());
                data.setValue(output.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
View Full Code Here


    }
   
    protected Map<String, InputData> toInputDataMap(List<TaskPropertyRef> inputs) {
        Map<String, InputData> retval = new HashMap<String, InputData>();
        for (TaskPropertyRef ref : inputs) {
            InputData in = new InputData();
            in.setName(ref.getName());
            retval.put(ref.getName(), in);
        }
        return retval;
    }
View Full Code Here

    }
   
    @Override
    protected void createStyles() {
        FBFormItem item = getItem();
        InputData in = null;
        if (this.input != null) {
            in = new InputData();
            in.setName(this.input.getName());
            in.setValue(this.input.getSourceExpresion());
            in.setMimeType("multipart/form-data");
            in.setFormatter(new Formatter() {
                @Override
                public Object format(Object object) {
                    return object;
                }
                @Override
View Full Code Here

                    dataSnapshot.put("newTaskID", event.getSelectedTask().getTaskId());
                    Map<String, InputData> inputs = new HashMap<String, InputData>();
                    Map<String, OutputData> outputs = new HashMap<String, OutputData>();
                    if (event.getSelectedTask().getInputs() != null) {
                        for (TaskPropertyRef input : event.getSelectedTask().getInputs()) {
                            InputData in = new InputData();
                            in.setName(input.getName());
                            in.setValue(input.getSourceExpresion());
                            inputs.put(input.getName(), in);
                        }
                    }
                    if (event.getSelectedTask().getOutputs() != null) {
                        for (TaskPropertyRef output : event.getSelectedTask().getOutputs()) {
View Full Code Here

    private Map<String, InputData> toInputs(List<TaskPropertyRef> inputs) {
        Map<String, InputData> retval = new HashMap<String, InputData>();
        if (inputs != null) {
            for (TaskPropertyRef ref : inputs) {
                InputData input = new InputData();
                input.setName(ref.getName());
                input.setValue(ref.getSourceExpresion());
                retval.put(ref.getName(), input);
            }
        }
        return retval;
    }
View Full Code Here

    private Grid createInputTable() {
        Grid inputTable = new Grid(this.inputs.size(), 2);
        List<InputData> inputList = new ArrayList<InputData>(this.inputs.values());
        for (int index = 0; index < inputList.size(); index++) {
            final InputData input = inputList.get(index);
            populateRetData(input);
            inputTable.setWidget(index, 0, new Label(input.getName()));
            final TextBox inputText = new TextBox();
            inputText.setValue(input.getValue());
            inputText.addChangeHandler(new ChangeHandler() {
                @Override
                public void onChange(ChangeEvent event) {
                    input.setValue(inputText.getValue());
                    populateRetData(input);
                }
            });
            inputTable.setWidget(index, 1, inputText);
        }
View Full Code Here

        super.populate(rep);
        LoopBlockRepresentation lrep = (LoopBlockRepresentation) rep;
        this.variableName = lrep.getVariableName();
        this.loopBlock.clear();
        if (lrep.getInputName() != null && !"".equals(lrep.getInputName())) {
            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

TOP

Related Classes of org.jbpm.formapi.shared.api.InputData

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.