=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementOperandsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementOperandsAction.java 2011-05-16 14:21:57 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementOperandsAction.java 2011-06-16 12:49:19 +0000 @@ -29,6 +29,7 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.Iterator; import java.util.List; import org.hisp.dhis.dataelement.DataElementCategoryService; @@ -115,6 +116,21 @@ operands = new ArrayList(); } + if ( key != null ) + { + Iterator iterator = operands.iterator(); + + while ( iterator.hasNext() ) + { + DataElementOperand operand = iterator.next(); + + if ( operand.getOperandName().toLowerCase().indexOf( key.toLowerCase() ) == -1 ) + { + iterator.remove(); + } + } + } + Collections.sort( operands, new DataElementOperandNameComparator() ); if ( usePaging )