*/
@SuppressWarnings("unchecked")
protected void populateParams() {
super.populateParams();
Table table = ((Table) component);
table.setValue(value);
table.setStatus(status);
table.setPageable("true".equals(pageable));
table.setPageParamPrefix(pageParamPrefix);
table.setDynamic("true".equals(dynamic));
if( dynamicCols != null ){
Object obj = findValue(dynamicCols);
if( obj != null ){
List<IColumn> cols = new ArrayList<IColumn>();
if(obj instanceof List ){
cols = (List<IColumn>)obj;
}else if( obj instanceof String[] ){//字符串
Set<String> ids = new HashSet<String>();
for(String col:(String[])obj )
ids.add(col);
int i=0;
for( String id:ids )
cols.add( new CustomizeColumn(id,String.valueOf(i++)) );
}else if( obj instanceof Map ){ //参数为Map
for(Object key:((Map<?,?>)obj).keySet() )
cols.add( new CustomizeColumn(key.toString()
,((Map<?,?>)obj).get(key).toString()) );
}
table.setDynamicCols(cols);
}
}
}