Examples of EnumDropDown


Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    private boolean isFieldVariable() {
        return field.getNature() == FieldData.TYPE_VARIABLE;
    }

    private EnumDropDown booleanEditor() {
        return new EnumDropDown(field.getValue(),
                new DropDownValueChanged() {
                    public void valueChanged(String newText,
                                             String newValue) {
                        valueHasChanged(newValue);
                    }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

                },
                DropDownData.create(new String[]{"true", "false"}));
    }

    private EnumDropDown dropDownEditor(final DropDownData dropDownData) {
        return new EnumDropDown(field.getValue(),
                new DropDownValueChanged() {
                    public void valueChanged(String newText,
                                             String newValue) {
                        valueHasChanged(newValue);
                        for (FieldDataConstraintEditor dependentEnumEditor : dependentEnumEditors) {
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

        }
    }

    private void refreshDropDownData() {
        if (this.valueEditorWidget instanceof EnumDropDown) {
            final EnumDropDown dropdown = (EnumDropDown) this.valueEditorWidget;
            dropdown.setDropDownData(field.getValue(),
                    helper.getEnums());
        }
    }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

        String flType = dmo.getFieldType( factType,  field.getFieldName());
        panel.clear();

        if ( flType != null && flType.equals( DataType.TYPE_BOOLEAN ) ) {
            String[] c = new String[]{"true", "false"};
            panel.add( new EnumDropDown( field.getExpected(),
                    new DropDownValueChanged() {
                        public void valueChanged(String newText,
                                                 String newValue) {
                            callback.valueChanged( newValue );
                        }
                    },
                    DropDownData.create(c) ) );

        } else if ( flType != null && flType.equals( DataType.TYPE_DATE ) ) {
            final DatePickerTextBox datePicker = new DatePickerTextBox( field.getExpected() );
            String m = TestScenarioConstants.INSTANCE.ValueFor0( field.getFieldName() );
            datePicker.setTitle( m );
            datePicker.addValueChanged( new ValueChanged() {
                public void valueChanged(String newValue) {
                    field.setExpected( newValue );
                }
            } );
            panel.add( datePicker );

        } else {
            Map<String, String> currentValueMap = new HashMap<String, String>();
            // TODO fill currentValueMap with values of other VerifyFields (if any)
            DropDownData dropDownData = dmo.getEnums( factType,
                    field.getFieldName(),
                    currentValueMap );
            if ( dropDownData != null ) {
                //GUVNOR-1324: Java enums are of type TYPE_COMPARABLE whereas Guvnor enums are not.
                //The distinction here controls whether the EXPECTED value is handled as a true
                //Java enum or a literal with a selection list (i.e. Guvnor enum)
                String dataType = dmo.getFieldType( factType,  field.getFieldName() );
                if ( dataType.equals( DataType.TYPE_COMPARABLE ) ) {
                    field.setNature( FieldData.TYPE_ENUM );
                } else {
                    field.setNature( FieldData.TYPE_LITERAL );
                }

                panel.add( new EnumDropDown( field.getExpected(),
                        new DropDownValueChanged() {
                            public void valueChanged(String newText,
                                                     String newValue) {
                                callback.valueChanged( newValue );
                            }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    }

    private void refresh() {
        root.clear();
        if ( enums != null && (enums.getFixedList() != null || enums.getQueryExpression() != null) ) {
            root.add( new EnumDropDown( methodParameter.value,
                                        new DropDownValueChanged() {
                                            public void valueChanged(String newText,
                                                                     String newValue) {
                                                methodParameter.value = newValue;
                                                if ( onValueChangeCommand != null ) {
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

                                             field.getFieldName() );
        panel.clear();

        if ( flType != null && flType.equals( DataType.TYPE_BOOLEAN ) ) {
            String[] c = new String[]{ "true", "false" };
            panel.add( new EnumDropDown( field.getExpected(),
                                         new DropDownValueChanged() {
                                             public void valueChanged( String newText,
                                                                       String newValue ) {
                                                 callback.valueChanged( newValue );
                                             }
                                         },
                                         DropDownData.create( c ),
                                         oracle.getResourcePath() ) );

        } else if ( flType != null && flType.equals( DataType.TYPE_DATE ) ) {
            final DatePickerTextBox datePicker = new DatePickerTextBox( field.getExpected() );
            String m = TestScenarioConstants.INSTANCE.ValueFor0( field.getFieldName() );
            datePicker.setTitle( m );
            datePicker.addValueChanged( new ValueChanged() {
                public void valueChanged( String newValue ) {
                    field.setExpected( newValue );
                }
            } );
            panel.add( datePicker );

        } else {
            Map<String, String> currentValueMap = new HashMap<String, String>();
            // TODO fill currentValueMap with values of other VerifyFields (if any)
            DropDownData dropDownData = oracle.getEnums( factType,
                                                         field.getFieldName(),
                                                         currentValueMap );
            if ( dropDownData != null ) {
                //GUVNOR-1324: Java enums are of type TYPE_COMPARABLE whereas Guvnor enums are not.
                //The distinction here controls whether the EXPECTED value is handled as a true
                //Java enum or a literal with a selection list (i.e. Guvnor enum)
                String dataType = oracle.getFieldType( factType, field.getFieldName() );
                if ( dataType.equals( DataType.TYPE_COMPARABLE ) ) {
                    field.setNature( FieldData.TYPE_ENUM );
                } else {
                    field.setNature( FieldData.TYPE_LITERAL );
                }

                panel.add( new EnumDropDown( field.getExpected(),
                                             new DropDownValueChanged() {
                                                 public void valueChanged( String newText,
                                                                           String newValue ) {
                                                     callback.valueChanged( newValue );
                                                 }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

                                 DropDownData.create( new String[]{ "true", "false" } ),
                                 helper.getDataModelOracle().getResourcePath() );
    }

    private EnumDropDown dropDownEditor( final DropDownData dropDownData ) {
        return new EnumDropDown( field.getValue(),
                                 new DropDownValueChanged() {
                                     public void valueChanged( String newText,
                                                               String newValue ) {
                                         valueHasChanged( newValue );
                                         for ( FieldDataConstraintEditor dependentEnumEditor : dependentEnumEditors ) {
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

        }
    }

    private void refreshDropDownData() {
        if ( this.valueEditorWidget instanceof EnumDropDown ) {
            final EnumDropDown dropdown = (EnumDropDown) this.valueEditorWidget;
            dropdown.setDropDownData( field.getValue(),
                                      helper.getEnums() );
        }
    }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    private boolean isFieldVariable() {
        return field.getNature() == FieldData.TYPE_VARIABLE;
    }

    private EnumDropDown booleanEditor() {
        return new EnumDropDown( field.getValue(),
                                 new DropDownValueChanged() {
                                     public void valueChanged( String newText,
                                                               String newValue ) {
                                         valueHasChanged( newValue );
                                     }
View Full Code Here

Examples of org.drools.workbench.screens.guided.rule.client.widget.EnumDropDown

    }

    private void refresh() {
        root.clear();
        if ( enums != null && ( enums.getFixedList() != null || enums.getQueryExpression() != null ) ) {
            root.add( new EnumDropDown( methodParameter.value,
                                        new DropDownValueChanged() {
                                            public void valueChanged( String newText,
                                                                      String newValue ) {
                                                methodParameter.value = newValue;
                                                if ( onValueChangeCommand != null ) {
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.