Changeset 22642


Ignore:
Timestamp:
02/09/10 09:56:28 (17 months ago)
Author:
dbutano
Message:

If the operator is null, the contraint could be a lookup constraint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mnw21/pathquery_refactor/intermine/web/main/src/org/intermine/web/struts/TemplateAction.java

    r22640 r22642  
    258258                        String op = (String) tf.getAttributeOps(key); 
    259259                        if (op == null) { 
    260                             if (tf.getNullConstraint(key) != null) { 
     260                            if (c instanceof PathConstraintLookup) { 
     261                                value = new TemplateValue(c, ConstraintOp.LOOKUP, 
     262                                        (String) tf.getAttributeValues(key), 
     263                                        TemplateValue.ValueType.SIMPLE_VALUE); 
     264                            } else if (tf.getNullConstraint(key) != null) { 
    261265                                if (ConstraintOp.IS_NULL.toString() 
    262266                                    .equals(tf.getNullConstraint(key))) { 
     
    277281                            String constraintValue = ""; 
    278282                            String multiValueAttribute = tf.getMultiValueAttribute(key); 
    279                             if(multiValueAttribute != null && !("".equals(multiValueAttribute))) { 
     283                            if (multiValueAttribute != null && !("".equals(multiValueAttribute))) { 
    280284                                constraintValue = tf.getMultiValueAttribute(key); 
    281285                            } else { 
     
    319323        } else if (con instanceof PathConstraintNull) { 
    320324            return ((PathConstraintNull) con).getOp().toString(); 
    321         } else if (con instanceof PathConstraintMultiValue) 
    322             return ((PathConstraintMultiValue) con).getOp().toString(); 
     325        } else if (con instanceof PathConstraintMultiValue) { 
     326            return ((PathConstraintMultiValue) con).getOp().toString(); 
     327        } 
    323328        return null; 
    324329    } 
Note: See TracChangeset for help on using the changeset viewer.