form.setNumColumns(2);
TextItem nameItem = new TextItem("name", "Instance Name");
TextItem serverItem = new TextItem("server", "Server Configuration");
final ButtonItem enableItem = new ButtonItem("running", "Action") {
@Override
public void setValue(Boolean b) {
if(b)
button.setText("Stop");
else
button.setText("Start");
}
};
enableItem.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
String state = form.getEditedEntity().isRunning() ? "Stop" : "Start";
Feedback.confirm(state + " server instance", "Do you want to " + state + " this server "+form.getEditedEntity().getName()+"?",