// --------------------
MultipleToOneLayout layout = new MultipleToOneLayout()
.setTitle(Console.CONSTANTS.common_label_serverGroupConfigurations())
.setHeadline("Server Configurations")
.setDescription(Console.CONSTANTS.common_serverConfig_desc())
.setMaster(Console.MESSAGES.available(Console.CONSTANTS.common_label_serverConfigs()), serverConfigTable)
.setMasterTools(toolStrip.asWidget())
.addDetail("Attributes", details.asWidget())
.addDetail(Console.CONSTANTS.common_label_virtualMachine(), jvmEditor.asWidget())
.addDetail(Console.CONSTANTS.common_label_systemProperties(), propertyEditor.asWidget());
// 1. Filter must be set *after* jvmEditor.asWidget()
// 2. We don't get exceptions for nested resources like "/{selected.host}/server-config=*/jvm=*",
// so we use the parent address assuming that the privileges are the same - i.e. if we cannot modify the
// server-config, we shouldn't be able to edit the JVM settings either.
jvmEditor.setSecurityContextFilter("/{selected.host}/server-config=*");
details.bind(serverConfigTable);
serverConfigTable.getSelectionModel().addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent selectionChangeEvent) {
presenter.onServerConfigSelectionChanged(getSelectionModel().getSelectedObject());
}
});
return layout.build();
}