tableFooter.appendHtmlConstant("<span style='font-size:10px;color:#A7ABB4;'>[1] "+Console.MESSAGES.deployment_filesystem()+"</span>");
Form<DeploymentRecord> form = new Form<DeploymentRecord>(DeploymentRecord.class);
form.setNumColumns(2);
form.setEnabled(true);
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);
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();
filter = new DeploymentFilter(deploymentData);
toolStrip.addToolWidget(filter.asWidget());
ToolButton addContentBtn = new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
presenter.launchNewDeploymentDialoge(null, false);
}
});
addContentBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_addContent_deploymentsOverview());
toolStrip.addToolButtonRight(addContentBtn);
toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_remove(),
new ClickHandler()
{
@Override
public void onClick(ClickEvent clickEvent)
{
final DeploymentRecord selection = deploymentSelection.getSelectedObject();
if (selection != null)
{
new DeploymentCommandDelegate(ContentRepositoryPanel.this.presenter,
DeploymentCommand.REMOVE_FROM_DOMAIN).execute(selection);
}
}
}));
toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_assign(),
new ClickHandler()
{
@Override
public void onClick(ClickEvent clickEvent)
{
final DeploymentRecord selection = deploymentSelection.getSelectedObject();
if (selection != null)
{
new DeploymentCommandDelegate(ContentRepositoryPanel.this.presenter,
DeploymentCommand.ADD_TO_GROUP).execute(selection);
}
}
}));
toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_replace(),
new ClickHandler()
{
@Override
public void onClick(ClickEvent clickEvent)
{
final DeploymentRecord selection = deploymentSelection.getSelectedObject();
if (selection != null)
{
new DeploymentCommandDelegate(ContentRepositoryPanel.this.presenter,
DeploymentCommand.UPDATE_CONTENT).execute(selection);
}
}
}));
Form<DeploymentRecord> form2 = new Form<DeploymentRecord>(DeploymentRecord.class);
form2.setNumColumns(2);
form2.setEnabled(true);
TextAreaItem path = new TextAreaItem("path", "Path");
TextBoxItem relative = new TextBoxItem("relativeTo", "Relative To");
form2.setFields(path, relative);
form2.bind(deploymentsTable);
MultipleToOneLayout layout = new MultipleToOneLayout()