String[] splitTypeFields = typeFields.split( "," );
for ( int j = 0; j < splitTypeFields.length; j++ ) {
String typeField = splitTypeFields[j];
for ( int i = 0; i < cons.length; i++ ) {
FieldConstraint con = cons[i];
if ( con instanceof SingleFieldConstraint ) {
SingleFieldConstraint sfc = (SingleFieldConstraint) con;
if ( sfc.getFieldName().trim().equals( typeField.trim() ) ) {
if ( addOpeninColumn ) {
key += "[";
addOpeninColumn = false;
}
key += typeField + "=" + sfc.getValue();
if ( j != (splitTypeFields.length - 1) ) {
key += ",";
}
}
}
}
}
if ( !addOpeninColumn ) {
key += "]";
}
DropDownData data = DropDownData.create( this.dataEnumLists.get( key ) );
if ( data != null ) {
return DropDownData.create( this.dataEnumLists.get( key ) );
}
} else if ( _typeFields != null ) {
// these enums are calculated on demand, server side...
String[] fieldsNeeded = (String[]) _typeFields;
String queryString = getQueryString( pat.getFactType(),
field,
fieldsNeeded,
this.dataEnumLists );
String[] valuePairs = new String[fieldsNeeded.length];
// collect all the values of the fields needed, then return it
// as a string...
for ( int i = 0; i < fieldsNeeded.length; i++ ) {
for ( int j = 0; j < pat.constraintList.constraints.length; j++ ) {
FieldConstraint con = pat.constraintList.constraints[j];
if ( con instanceof SingleFieldConstraint ) {
SingleFieldConstraint sfc = (SingleFieldConstraint) con;
if ( sfc.getFieldName().equals( fieldsNeeded[i] ) ) {
valuePairs[i] = fieldsNeeded[i] + "=" + sfc.getValue();
}