Form<DeploymentRecord> form = new Form<DeploymentRecord>(DeploymentRecord.class);
form.setEnabled(false);
TextAreaItem name = new TextAreaItem("name", "Name");
TextAreaItem runtimeName = new TextAreaItem("runtimeName", "Runtime Name");
final ListItem groups = new ListItem("assignments", "Assigned Groups");
form.setFields(name, runtimeName, groups);
runtimeName.setEnabled(false);
name.setEnabled(false);
groups.setEnabled(false);
form.bind(deploymentsTable);
deploymentSelection.addSelectionChangeHandler(
new SelectionChangeEvent.Handler()
{
@Override
public void onSelectionChange(SelectionChangeEvent event)
{
DeploymentRecord selection = deploymentSelection.getSelectedObject();
if (selection != null)
{
List<String> serverGroups = contentRepository.getServerGroups(selection);
groups.setValue(serverGroups);
}
}
});
final ToolStrip toolStrip = new ToolStrip();