[jboss-svn-commits] JBL Code SVN: r36245 - labs/jbossrules/soa_branches/BRMS-5.1.x/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 7 20:19:48 EST 2010


Author: tsurdilovic
Date: 2010-12-07 20:19:48 -0500 (Tue, 07 Dec 2010)
New Revision: 36245

Modified:
   labs/jbossrules/soa_branches/BRMS-5.1.x/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/ConstraintValueEditor.java
Log:
BRMS-374 : Cannot set field value to a bound variable if its a basic type

Modified: labs/jbossrules/soa_branches/BRMS-5.1.x/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/ConstraintValueEditor.java
===================================================================
--- labs/jbossrules/soa_branches/BRMS-5.1.x/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/ConstraintValueEditor.java	2010-12-08 01:18:42 UTC (rev 36244)
+++ labs/jbossrules/soa_branches/BRMS-5.1.x/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/ConstraintValueEditor.java	2010-12-08 01:19:48 UTC (rev 36245)
@@ -373,24 +373,22 @@
         form.addRow(new HTML("<hr/>"));
         form.addRow(new SmallLabel(constants.AdvancedOptions()));
 
-        //only want to show variables if we have some !
-        if (this.model.getBoundVariablesInScope(this.constraint).size() > 0 || SuggestionCompletionEngine.TYPE_COLLECTION.equals(this.fieldType)) {
+      //only want to show variables if we have some !
+        if ( this.model.getBoundVariablesInScope( this.constraint ).size() > 0 || SuggestionCompletionEngine.TYPE_COLLECTION.equals( this.fieldType ) ) {
             List<String> vars = this.model.getBoundFacts();
             boolean foundABouncVariableThatMatches = false;
-            for (String var : vars) {
-                FactPattern f = model.getBoundFact(var);
-                String fieldConstraint = model.getBindingType(var);
+            for ( String var : vars ) {
+                FactPattern f = model.getBoundFact( var );
+                String fieldConstraint = model.getBindingType( var );
 
-                if ((f != null && f.factType != null && this.fieldType != null)
-                        && (f.factType.equals(this.fieldType)
-                        || this.fieldType.equals(fieldConstraint))) {
+                if ( (f != null && f.factType != null && f.factType.equals( this.fieldType )) || (this.fieldType != null && this.fieldType.equals( fieldConstraint )) ) {
                     foundABouncVariableThatMatches = true;
                     break;
                 } else {
                     // for collection, present the list of possible bound variable
-                    String factCollectionType = sce.getParametricFieldType(pattern.factType,
-                            this.fieldName);
-                    if ((f != null && factCollectionType != null && f.factType.equals(factCollectionType)) || (factCollectionType != null && factCollectionType.equals(fieldConstraint))) {
+                    String factCollectionType = sce.getParametricFieldType( pattern.factType,
+                                                                            this.fieldName );
+                    if ( (f != null && factCollectionType != null && f.factType.equals( factCollectionType )) || (factCollectionType != null && factCollectionType.equals( fieldConstraint )) ) {
                         foundABouncVariableThatMatches = true;
                         break;
                     }



More information about the jboss-svn-commits mailing list