for (int i = 0; i < cols.length; i++)
{
WebMarkupContainer item = new WebMarkupContainer(filters.newChildId());
item.setRenderBodyOnly(true);
IColumn col = cols[i];
Component filter = null;
if (col instanceof IFilteredColumn)
{
IFilteredColumn filteredCol = (IFilteredColumn)col;
filter = filteredCol.getFilter(FILTER_COMPONENT_ID, form);
}
if (filter == null)
{
filter = new NoFilter(FILTER_COMPONENT_ID);
}
else
{
if (!filter.getId().equals(FILTER_COMPONENT_ID))
{
throw new IllegalStateException(
"filter component returned with an invalid component id. invalid component id ["
+ filter.getId() + "] required component id ["
+ FILTER_COMPONENT_ID + "] generating column ["
+ col.toString() + "] ");
}
}
item.add(filter);