Added Tasks Validations
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@95441 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
10c5e16107
commit
3cb2f887ed
|
@ -22,7 +22,9 @@ import com.sencha.gxt.core.client.util.Margins;
|
|||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||
|
@ -39,7 +41,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
protected VerticalLayoutContainer vl;
|
||||
protected EventBus eventBus;
|
||||
protected TRId trId;
|
||||
|
||||
|
||||
protected FieldSet trFieldSet;
|
||||
protected FieldSet tableFieldSet;
|
||||
|
||||
|
@ -59,7 +61,6 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
protected VerticalLayoutContainer layoutTable;
|
||||
protected TextButton saveButton;
|
||||
protected TextButton validationsButton;
|
||||
|
||||
|
||||
public TabularResourceProperties(String name, EventBus eventBus) {
|
||||
super();
|
||||
|
@ -134,12 +135,31 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
}
|
||||
};
|
||||
saveButton.addSelectHandler(saveHandler);
|
||||
layoutTabularResource.add(saveButton, new VerticalLayoutData(-1, -1,
|
||||
|
||||
// Validation Button
|
||||
validationsButton = new TextButton("Validations");
|
||||
validationsButton.setIcon(ResourceBundle.INSTANCE.tableValidation());
|
||||
validationsButton.setIconAlign(IconAlign.RIGHT);
|
||||
validationsButton.setTitle("Validations");
|
||||
|
||||
SelectHandler validationsHandler = new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
openValidations();
|
||||
|
||||
}
|
||||
};
|
||||
validationsButton.addSelectHandler(validationsHandler);
|
||||
|
||||
HBoxLayoutContainer hBox=new HBoxLayoutContainer();
|
||||
hBox.add(saveButton, new BoxLayoutData(new Margins(2,5,2,5)));
|
||||
hBox.add(validationsButton,new BoxLayoutData(new Margins(2,5,2,5)));
|
||||
|
||||
layoutTabularResource.add(hBox, new VerticalLayoutData(-1, -1,
|
||||
new Margins(2)));
|
||||
|
||||
vl.add(trFieldSet);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void updateTabularResource(TabResource tabResource) {
|
||||
|
@ -170,23 +190,6 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
layoutTable.add(new FieldLabel(tableTypeNameField, "Type"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
|
||||
// Validation Button
|
||||
validationsButton = new TextButton("Validations");
|
||||
validationsButton.setIcon(ResourceBundle.INSTANCE.tableValidation());
|
||||
validationsButton.setIconAlign(IconAlign.RIGHT);
|
||||
validationsButton.setTitle("Validations");
|
||||
|
||||
SelectHandler validationsHandler = new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
openValidations();
|
||||
|
||||
}
|
||||
};
|
||||
validationsButton.addSelectHandler(validationsHandler);
|
||||
layoutTable.add(validationsButton, new VerticalLayoutData(-1, -1,
|
||||
new Margins(2)));
|
||||
|
||||
vl.add(tableFieldSet);
|
||||
}
|
||||
|
||||
|
@ -194,7 +197,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
Log.debug("Request Validations Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.VALIDATIONSTABLEPANEL);
|
||||
WidgetRequestType.VALIDATIONSTASKSPANEL);
|
||||
e.setTrId(trId);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue