private ToolButton edit;
@Override
public Widget createWidget() {
LayoutPanel layout = new RHSContentPanel("Servlet");
layout.add(new ContentHeaderLabel("Servlet/HTTP Configuration"));
layout.add(new ContentDescription(Console.CONSTANTS.subsys_web_desc()));
// ----
form = new Form(JSPContainerConfiguration.class);
form.setNumColumns(2);
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());
// ----
CheckBoxItem disabled= new CheckBoxItem("disabled", "Disabled?");
CheckBoxItem development= new CheckBoxItem("development", "Development?");
TextBoxItem instanceId = new TextBoxItem("instanceId", "Instance ID", false);
CheckBoxItem keepGenerated= new CheckBoxItem("keepGenerated", "Keep Generated?");
NumberBoxItem checkInterval = new NumberBoxItem("checkInterval", "Check Interval");
CheckBoxItem sourceFragment= new CheckBoxItem("displaySource", "Display Source?");
form.setFields(disabled, development, instanceId);
form.setFieldsInGroup(Console.CONSTANTS.common_label_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;
}