private ToolButton edit;
@Override
public Widget createWidget() {
LayoutPanel layout = new RHSContentPanel("Servlet");
layout.add(new ContentHeaderLabel("Servlet/HTTP Configuration"));
// ----
form = new Form(JSPContainerConfiguration.class);
form.setNumColumns(2);
ContentGroupLabel label = new ContentGroupLabel("JSP Container");
label.getElement().setAttribute("style", "margin-bottom:0px;");
layout.add(label);
FormToolStrip toolStrip = new FormToolStrip<JSPContainerConfiguration>(
form,
new FormToolStrip.FormCallback<JSPContainerConfiguration>() {
@Override
public void onSave(Map<String, Object> changeset) {
presenter.onSaveJSPConfig(changeset);
}
@Override
public void onDelete(JSPContainerConfiguration entity) {
}
}
);
toolStrip.providesDeleteOp(false);
layout.add(toolStrip.asWidget());
// ----
StatusItem disabled= new StatusItem("disabled", "Disabled?");
StatusItem development= new StatusItem("development", "Development?");
StatusItem keepGenerated= new StatusItem("keepGenerated", "Keep Generated?");
NumberBoxItem checkInterval = new NumberBoxItem("checkInterval", "Check Interval");
StatusItem sourceFragment= new StatusItem("displaySource", "Display Source?");
form.setFields(disabled, development);
form.setFieldsInGroup("Advanced", new DisclosureGroupRenderer(), keepGenerated, checkInterval, sourceFragment);
FormHelpPanel helpPanel = new FormHelpPanel(new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = Baseadress.get();
address.add("subsystem", "web");
address.add("configuration", "jsp-configuration");
return address;
}
},form);
layout.add(helpPanel.asWidget());
layout.add(form.asWidget());
form.setEnabled(false); // TODO:
// ----
TabPanel bottomLayout = new TabPanel();
bottomLayout.addStyleName("default-tabpanel");
bottomLayout.getElement().setAttribute("style", "padding-top:20px;");
connectorList = new ConnectorList(presenter);
bottomLayout.add(connectorList.asWidget(),"Connectors");
serverList = new VirtualServerList(presenter);
bottomLayout.add(serverList.asWidget(),"Virtual Servers");
bottomLayout.selectTab(0);
layout.add(bottomLayout);
return layout;
}