My class is as follows
public class CriteriaConfigImpl implements CriteriaConfig {
private long elementId;
private String displayName;
private String dataType;
private String internalMap;
private int displayOrder;
private List<OperandType> operands;
//..Setter Getter..//
}
And my main class is
public class Query {
private Long id;
@NotNull
@Size(min = 0, max = 1500)
private String queryString;
private String searchFilterCondition;
private List<CriteriaConfig> configuredCriteriaList;
//.. Other operations ..//
}
On my JSP page I want to display the operands as a list, currently I have done as
<form:select path="searchFilterCondition" multiple="false">
<form:options items="${query.configuredCriteriaList}" itemLabel="operands" value="operands"/>
</form:select>
If my CriteriaConfig’s are defined as
1. CriteriaConfig {1, "Test1", "String", "Test1", 1, "AND, OR, NOT" }
2. CriteriaConfig {2, "Trial", "Date", "Trial", 2, "LESSTHAN, GREATERTHAN" }
Now I want to check what displayName was selected and display the respective drop down, how do I go about this?
After much thought I have a solution, but it will cause performance problems on the long run, in a case when I have more number of CriteriaConfig objects, but nevertheless, this is what I have now, unless someone comes up with a better soln.