Package org.drools.ide.common.client.modeldriven

Examples of org.drools.ide.common.client.modeldriven.DropDownData


        pat.addConstraint( sfc );
        sfc = new SingleFieldConstraint( "f2" );
        sfc.setValue("f2val");
        pat.addConstraint( sfc );
       
        DropDownData dd = sce.getEnums( pat,
        "value" );
        assertNull( dd.fixedList );
        assertNotNull( dd.queryExpression );
        assertNotNull( dd.valuePairs );
       
View Full Code Here


                       SafeHtmlBuilder sb) {

        //We need to get the list of potential values to lookup the "Display" value from the "Stored" value.
        //Since the content of the list may be different for each cell (dependent enumerations) the list
        //has to be populated "on demand".
        DropDownData dd = sce.getEnums( this.factType,
                                        this.factField,
                                        this.dropDownManager.getCurrentValueMap( context ) );
        if ( dd == null ) {
            return;
        }
View Full Code Here

                                final String value) {

        //We need to get the list of potential values for the enumeration. Since the content
        //of the list may be different for each cell (dependent enumerations) the list
        //has to be populated "on demand".
        DropDownData dd = sce.getEnums( this.factType,
                                        this.factField,
                                        this.dropDownManager.getCurrentValueMap( context ) );
        if ( dd == null ) {
            return;
        }
View Full Code Here

                    //a couple of drop-downs so it's quicker to simply update them all.
                    updateEnumDropDowns();
                }
            };

            DropDownData dropDownData = getDropDownData();
            resultWidget = new EnumDropDown( value,
                                             handler,
                                             dropDownData );

            //Wrap widget within a HorizontalPanel to add a space before and after the Widget
View Full Code Here

            resultWidget.setDropDownData( selectedValue,
                                          getDropDownData() );
        }

        private DropDownData getDropDownData() {
            DropDownData dropDownData = completions.getEnums( factType,
                                                              factField,
                                                              sentence.getEnumFieldValueMap() );
            return dropDownData;
        }
View Full Code Here

            if ( type == null ) {
                type = this.getModeller().getModel().getRhsBoundFact( this.model.variable ).factType;
            }
        }

        DropDownData enums = completions.getEnums( type,
                val.field, this.model.fieldValues
        );

        return new MethodParameterValueEditor( val,
                                               enums,
View Full Code Here

            if ( type == null ) {
                type = this.getModeller().getModel().getRhsBoundFact( this.model.variable ).factType;
            }
        }

        DropDownData enums = completions.getEnums( type,
                val.field, this.model.fieldValues
        );
        ActionValueEditor actionValueEditor = new ActionValueEditor( val,
                                                                     enums,
                                                                     this.getModeller(),
View Full Code Here

        } else {
            valueType = sce.getFieldType( pattern.getFactType(),
                                          fieldName );
        }

        final DropDownData dropDownData;
        if ( SuggestionCompletionEngine.TYPE_BOOLEAN.equals( valueType ) ) {
            dropDownData = DropDownData.create( new String[]{"true", "false"} ); //NON-NLS
        } else {
            dropDownData = sce.getEnums( pattern,
                                         fieldName );
View Full Code Here

            valueType = sce.getFieldType( factType,
                                          fieldName );
        }

        final DropDownData dropDownData;
        if ( SuggestionCompletionEngine.TYPE_BOOLEAN.equals( valueType ) ) {
            dropDownData = DropDownData.create( new String[]{"true", "false"} ); //NON-NLS
        } else {
            dropDownData = sce.getEnums( pattern,
                                         fieldName );
View Full Code Here

        } else {
            Map<String, String> currentValueMap = new HashMap<String, String>();
            for (FieldData otherFieldData : givenFact.getFieldData()) {
                currentValueMap.put(otherFieldData.getName(), otherFieldData.getValue());
            }
            DropDownData dropDownData = sce.getEnums(factType, field.getName(), currentValueMap);
            if ( dropDownData != null ) {
                field.setNature( FieldData.TYPE_ENUM );
                panel.add( new EnumDropDown( field.getValue(),
                                             new DropDownValueChanged() {
                                                 public void valueChanged(String newText,
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.DropDownData

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.