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

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


        } 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


        SingleFieldConstraint f1 = new SingleFieldConstraint( "f1" );
        f1.setValue("a1");
        pat.addConstraint( f1 );
        pat.addConstraint( new SingleFieldConstraint( "f2" ) );

        DropDownData data = engine.getEnums( pat,
                                             "f2" );

        assertNotNull( data );
        assertEquals( 3,
                      data.fixedList.length );
View Full Code Here

        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

        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

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

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

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

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

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

    }

    private Widget valueEditor(final ActionFieldValue val) {
        SuggestionCompletionEngine completions = this.getModeller().getSuggestionCompletions();
        DropDownData enums = completions.getEnums( this.factType,
                                                   this.model.fieldValues,
                                                   val.field );

        ActionValueEditor actionValueEditor = new ActionValueEditor( val,
                                                                     enums,
View Full Code Here

                                         FactPattern pattern,
                                         String fieldName) {
        String 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

        SingleFieldConstraint f1 = new SingleFieldConstraint( "f1" );
        f1.setValue("a1");
        pat.addConstraint( f1 );
        pat.addConstraint( new SingleFieldConstraint( "f2" ) );

        DropDownData data = engine.getEnums( pat,
                                             "f2" );

        assertNotNull( data );
        assertEquals( 3,
                      data.fixedList.length );
View Full Code Here

        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

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.