Updated Flows
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-open-widget@100979 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e3faf134c1
commit
8630f1b123
|
@ -16,7 +16,7 @@ import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
|||
*
|
||||
*/
|
||||
public class TDOpen extends WizardWindow {
|
||||
protected static final int WITHWIZARD=750;
|
||||
protected static final int WITHWIZARD=800;
|
||||
protected static final int HEIGHTWIZARD=520;
|
||||
|
||||
protected TDOpenSession tdOpenSession;
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredE
|
|||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
|
@ -85,8 +86,9 @@ public class TabResourcesSelectionCard extends WizardCard {
|
|||
}
|
||||
|
||||
protected void retrieveLastTable() {
|
||||
TDGWTServiceAsync.INSTANCE.getLastTable(tdOpenSession
|
||||
.getSelectedTabResource().getTrId(),
|
||||
final TRId selectedTRId = tdOpenSession.getSelectedTabResource()
|
||||
.getTrId();
|
||||
TDGWTServiceAsync.INSTANCE.getLastTable(selectedTRId,
|
||||
new AsyncCallback<TableData>() {
|
||||
|
||||
@Override
|
||||
|
@ -97,19 +99,7 @@ public class TabResourcesSelectionCard extends WizardCard {
|
|||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
AlertMessageBox d = new AlertMessageBox(
|
||||
"Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
deleteTRWithLastTableNull();
|
||||
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
retrievedLastTableNull(selectedTRId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,6 +113,36 @@ public class TabResourcesSelectionCard extends WizardCard {
|
|||
|
||||
}
|
||||
|
||||
protected void retrievedLastTableNull(TRId trId) {
|
||||
if (trId.getTabResourceType().compareTo(TabResourceType.FLOW) == 0) {
|
||||
Log.debug("Attention",
|
||||
"This tabular resource has type flow and it does not have a valid table, no data entered in the flow");
|
||||
AlertMessageBox d = new AlertMessageBox("Attention",
|
||||
"No data entered in the flow");
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
} else {
|
||||
Log.debug("Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
AlertMessageBox d = new AlertMessageBox("Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
deleteTRWithLastTableNull();
|
||||
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
}
|
||||
}
|
||||
|
||||
protected void deleteTRWithLastTableNull() {
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
||||
"Would you like to delete this tabular resource without table?");
|
||||
|
|
|
@ -77,10 +77,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
|||
|
||||
protected static final ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.name(), 90, "Name");
|
||||
|
||||
protected static final ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.tabResourceType(), 30, "Type");
|
||||
|
||||
protected static final ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.tableTypeName(), 30, "Table Type");
|
||||
protected static final ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
||||
|
@ -88,7 +86,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
|||
protected static final ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.ownerLogin(), 70, "Owner");
|
||||
protected static final ColumnConfig<TabResource, String> dateColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.date(), 40, "Date");
|
||||
properties.date(), 50, "Date");
|
||||
|
||||
protected Grid<TabResource> grid;
|
||||
protected ResourceBundle res;
|
||||
|
@ -112,7 +110,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
|||
}
|
||||
try {
|
||||
buildPanel(properties.id(),
|
||||
Arrays.<ColumnConfig<TabResource, ?>> asList(nameColumn,
|
||||
Arrays.<ColumnConfig<TabResource, ?>> asList(nameColumn,typeColumn,
|
||||
tableTypeNameColumn, ownerColumn, agencyColumn, dateColumn),
|
||||
nameColumn);
|
||||
|
||||
|
|
Loading…
Reference in New Issue