use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.
the class RecordsContainer method prepareColumnModel.
@Override
public ColumnModel prepareColumnModel() {
List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
StringBuilder templateBuilder = new StringBuilder();
templateBuilder.append("<p><b>");
templateBuilder.append(CatalogFinderConstants.INSTANCE.RecordsContainer_xTemplateAbstractText());
templateBuilder.append(":</b> {ABSTRACT_TEXT}</p><br>");
templateBuilder.append("<p><b>");
templateBuilder.append(CatalogFinderConstants.INSTANCE.RecordsContainer_xTemplateKeywordsText());
templateBuilder.append(":</b><br></p>");
templateBuilder.append("<tpl for=\"SUBJECTS\">");
templateBuilder.append("<div>{.}</div>");
templateBuilder.append("</tpl>");
XTemplate tpl = XTemplate.create(templateBuilder.toString());
rowExpander = new RowExpander(tpl);
configs.add(rowExpander);
ColumnConfig titleColumn = new ColumnConfig();
titleColumn.setId(RecordKeyValue.TITLE.toString());
titleColumn.setHeaderHtml(CatalogFinderConstants.INSTANCE.RecordsContainer_titleColumnHeaderText());
titleColumn.setWidth(490);
titleColumn.setFixed(true);
titleColumn.setResizable(false);
configs.add(titleColumn);
selectionModel = new CheckBoxSelectionModel<FullRecord>();
selectionModel.setSelectionMode(SelectionMode.SINGLE);
configs.add(selectionModel.getColumn());
return new ColumnModel(configs);
}
use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.
the class CatalogGridLayersWidget method prepareColumnModel.
@Override
public ColumnModel prepareColumnModel() {
List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
XTemplate tpl = XTemplate.create("<p><b>Abstract:</b> {abstractText}</p>");
rowExpander = new RowExpander(tpl);
configs.add(rowExpander);
ColumnConfig name = new ColumnConfig();
name.setId(GPLayerGrid.GPLayerBeanKeyValue.GPLAYER_NAME.getValue());
name.setHeaderHtml(CatalogFinderConstants.INSTANCE.CatalogGridLayersWidget_layerNameHeaderText());
name.setWidth(200);
configs.add(name);
ColumnConfig title = new ColumnConfig();
title.setId(GPLayerGrid.GPLayerBeanKeyValue.GPLAYER_LABEL.getValue());
title.setHeaderHtml(CatalogFinderConstants.INSTANCE.CatalogGridLayersWidget_titleHeaderText());
title.setWidth(150);
configs.add(title);
return new ColumnModel(configs);
}
use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.
the class GridLayersWidget method prepareColumnModel.
@Override
public ColumnModel prepareColumnModel() {
List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
XTemplate tpl = XTemplate.create("<p><b>Abstract:</b> {abstractText}</p>");
rowExpander = new RowExpander(tpl);
configs.add(rowExpander);
ColumnConfig name = new ColumnConfig();
name.setId(GPLayerBeanKeyValue.GPLAYER_NAME.getValue());
name.setHeaderHtml(ServerModuleConstants.INSTANCE.GridLayersWidget_layerNameHeaderText());
name.setWidth(200);
configs.add(name);
ColumnConfig title = new ColumnConfig();
title.setId(GPLayerBeanKeyValue.GPLAYER_LABEL.getValue());
title.setHeaderHtml(ServerModuleConstants.INSTANCE.GridLayersWidget_titleHeaderText());
title.setWidth(150);
configs.add(title);
return new ColumnModel(configs);
}
Aggregations