if (set == null)
{
set = "";
}
if (set != null && !"".equals(set)){
VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
set = vs.substitute(set, null);
}
StringTokenizer tokenizer = new StringTokenizer(choiceValues, ":");
int counter = 0;
while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken();
listItem = new TextValuePair(token, token);
field.addItem(listItem);
if (set.equals(token))
{
field.setSelectedIndex(field.getItemCount() - 1);
}
counter++;
}
}
else
{
listItem = new TextValuePair(getText((XMLElement) choices.elementAt(i)),
((XMLElement) choices.elementAt(i)).getAttribute(COMBO_VALUE));
field.addItem(listItem);
XMLElement choiceElement = (XMLElement) choices.elementAt(i);
variables.add(spec.getAttribute(VARIABLE));
values.add("combo");
// handle additional variable-value assignments
Vector assignments = choiceElement.getChildrenNamed(ASSIGN);
for (int j = 0; j < assignments.size(); j++)
{
XMLElement assignmentElement = (XMLElement) assignments.get(j);
String variable2 = assignmentElement.getAttribute(VARIABLE);
if (variable2 != null)
{
variables.add(variable2);
values.add(assignmentElement.getAttribute(VALUE));
//values.add();
//System.out.println(variable2);
//idata.setVariable(variable2,assignmentElement.getAttribute(VALUE));
}
}
String set = ((XMLElement) choices.elementAt(i)).getAttribute(SET);
if (set != null)
{
if (set != null && !"".equals(set)){
VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
set = vs.substitute(set, null);
}
if (set.equals(TRUE))
{
field.setSelectedIndex(i);
}