Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@96048 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-23 14:16:27 +00:00
parent 1f51d4fe21
commit d0162b8fdc
1 changed files with 20 additions and 4 deletions

View File

@ -17,6 +17,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.WidgetRequestTyp
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
@ -130,6 +132,16 @@ public class TabularResourceProperties extends FramedPanel {
finalizedField = new CheckBox();
// finalizedField.setBoxLabel("");
finalizedField.setValue(false);
finalizedField.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
info("Attention",
"Attention, a tabular resource set to finalize can not be modified!");
}
}
});
layoutTabularResource.add(new FieldLabel(finalizedField, "Finalized"),
new VerticalLayoutData(1, -1));
@ -353,6 +365,10 @@ public class TabularResourceProperties extends FramedPanel {
+ tabResource);
info("Proprerties",
"Tabular Resource properties are set");
if(finalizedField.getValue()){
finalizedField.setEnabled(false);
finalizedField.setValue(true);
}
}