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:
parent
1f51d4fe21
commit
d0162b8fdc
|
@ -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;
|
||||
|
@ -128,8 +130,18 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
new VerticalLayoutData(1, -1));
|
||||
|
||||
finalizedField = new CheckBox();
|
||||
//finalizedField.setBoxLabel("");
|
||||
// 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));
|
||||
|
||||
|
@ -182,7 +194,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
dateField.setValue(tabResource.getDate());
|
||||
typeField.setValue(tabResource.getTrId().getTabularResourceType());
|
||||
rightField.setValue(tabResource.getRight());
|
||||
if(tabResource.isFinalized()){
|
||||
if (tabResource.isFinalized()) {
|
||||
finalizedField.setEnabled(false);
|
||||
finalizedField.setValue(true);
|
||||
} else {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue