panel.add(horzPanel);
// ----------------------------------------------------------------------
panel.add(new ContentGroupLabel(Console.CONSTANTS.common_label_attributes()));
form = new Form<Server>(Server.class);
form.setNumColumns(2);
TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
CheckBoxItem startedItem = new CheckBoxItem("autoStart", Console.CONSTANTS.common_label_autoStart());
//groupItem = new ComboBoxItem("group", "Server Group");
// TODO: https://issues.jboss.org/browse/AS7-661
TextItem groupItem = new TextItem("group", Console.CONSTANTS.common_label_serverGroup());
// ------------------------------------------------------
final NumberBoxItem portOffset = new NumberBoxItem("portOffset", Console.CONSTANTS.common_label_portOffset());
socketItem = new ComboBoxItem("socketBinding", Console.CONSTANTS.common_label_socketBinding())
{
@Override
public boolean validate(String value) {
boolean parentValid = super.validate(value);
//boolean portDefined = !portOffset.isModified();
return parentValid ;//&& portDefined;
}
@Override
public String getErrMessage() {
return Console.MESSAGES.common_validation_portOffsetUndefined(super.getErrMessage());
}
};
form.setFields(nameItem, groupItem, startedItem);
form.setFieldsInGroup(
"Advanced",
new DisclosureGroupRenderer(),
socketItem, portOffset
);
final FormHelpPanel helpPanel = new FormHelpPanel(
new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.add("host", presenter.getSelectedHost());
address.add("server-config", "*");
return address;
}
}, form
);
panel.add(helpPanel.asWidget());
panel.add(form.asWidget());
form.setEnabled(false);
// ------------------------------------------------------
TabPanel bottomLayout = new TabPanel();
bottomLayout.addStyleName("default-tabpanel");
// jvm editor
jvmEditor = new JvmEditor(presenter);
jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.add("host", presenter.getSelectedHost());
address.add("server-config", nameLabel.getText());
address.add("jvm", "*");
return address;
}
});
bottomLayout.add(jvmEditor.asWidget(), Console.CONSTANTS.common_label_virtualMachine());
propertyEditor = new PropertyEditor(presenter);
propertyEditor.setHelpText("A system property to set on this server.");
bottomLayout.add(propertyEditor.asWidget(), Console.CONSTANTS.common_label_systemProperties());
propertyEditor.setAllowEditProps(false);
panel.add(new ContentGroupLabel("Subresources"));
panel.add(bottomLayout);
bottomLayout.selectTab(0);