}
@Override
public Widget createWidget() {
LayoutPanel layout = new RHSContentPanel("Domain Overview");
HorizontalPanel hlayout = new HorizontalPanel();
hlayout.setStyleName("fill-layout-width");
hlayout.getElement().setAttribute("cellpadding", "10");
VerticalPanel vlayoutLeft = new VerticalPanel();
vlayoutLeft.setStyleName("fill-layout-width");
profileList = new CellList<ProfileRecord>(new ProfileCell());
profileList.setPageSize(25);
ContentGroupLabel leftLabel = new ContentGroupLabel("Available Profiles");
leftLabel.setIcon("common/profile.png");
vlayoutLeft.add(leftLabel);
vlayoutLeft.add(profileList);
// --------------------------------------
VerticalPanel vlayoutRight = new VerticalPanel();
vlayoutRight.setStyleName("fill-layout-width");
ContentGroupLabel rightLabel = new ContentGroupLabel("Server Groups");
rightLabel.setIcon("common/server_group.png");
vlayoutRight.add(rightLabel);
ServerGroupCell groupCell = new ServerGroupCell();
groupList = new CellList<ServerGroupRecord>(groupCell);
groupList.setPageSize(25);
final SingleSelectionModel<ServerGroupRecord> selectionModel = new SingleSelectionModel<ServerGroupRecord>();
groupList.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
ServerGroupRecord selectedRecord = selectionModel.getSelectedObject();
final String groupName = selectedRecord.getGroupName();
Console.MODULES.getPlaceManager().revealPlaceHierarchy(
new ArrayList<PlaceRequest>() {{
add(new PlaceRequest("domain"));
add(new PlaceRequest(NameTokens.ServerGroupPresenter).with("name", groupName));
}}
);
}
});
vlayoutRight.add(groupList);
// --------------------------------------
hlayout.add(vlayoutLeft);
hlayout.add(vlayoutRight);
layout.add(hlayout);
// --------------------------------------
//layout.add(new ContentGroupLabel("Domain Level Deployments"));