private String format = DEFAULT_FORMAT;
public void convertValueList() throws JspException
{
ValueList vl = getRootTag().getValueList();
try
{
while (vl.hasNext())
{
Object bean = vl.next();
Object xAxis = PropertyUtils.getProperty(bean, "ixaxis");
Object yAxis = PropertyUtils.getProperty(bean, "iyaxis");
Object value = PropertyUtils.getProperty(bean, "ivalue");
xAxisMap.put(xAxis, null);
Map map = (Map) yAxisMap.get(yAxis);
if (map == null)
{
yAxisMap.put(yAxis, map = new HashMap());
map.put("yaxis", yAxis);
}
map.put(JspUtils.format(xAxis, null, null).toLowerCase().replace(' ', '_'), value);
}
}
catch (Exception e)
{
LOGGER.error("InvertedRowTag.convertValueList() exception...", e);
}
//Add all the columns to the tag context.
for (Iterator iter = xAxisMap.keySet().iterator(); iter.hasNext();)
{
String label = JspUtils.format(iter.next(), null, null);
addColumnInfo(new ColumnInfo(label, label.toLowerCase().replace(' ', '_'), null, null));
}
getRootTag().setValueList(new DefaultListBackedValueList(new ArrayList(yAxisMap.values()), vl.getValueListInfo()));
}