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 {
|
public class TDOpen extends WizardWindow {
|
||||||
protected static final int WITHWIZARD=750;
|
protected static final int WITHWIZARD=800;
|
||||||
protected static final int HEIGHTWIZARD=520;
|
protected static final int HEIGHTWIZARD=520;
|
||||||
|
|
||||||
protected TDOpenSession tdOpenSession;
|
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.RibbonType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
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.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.WizardCard;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||||
|
|
||||||
|
@ -85,8 +86,9 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void retrieveLastTable() {
|
protected void retrieveLastTable() {
|
||||||
TDGWTServiceAsync.INSTANCE.getLastTable(tdOpenSession
|
final TRId selectedTRId = tdOpenSession.getSelectedTabResource()
|
||||||
.getSelectedTabResource().getTrId(),
|
.getTrId();
|
||||||
|
TDGWTServiceAsync.INSTANCE.getLastTable(selectedTRId,
|
||||||
new AsyncCallback<TableData>() {
|
new AsyncCallback<TableData>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -97,19 +99,7 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
new SessionExpiredEvent(
|
new SessionExpiredEvent(
|
||||||
SessionExpiredType.EXPIREDONSERVER));
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Attention",
|
retrievedLastTableNull(selectedTRId);
|
||||||
"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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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() {
|
protected void deleteTRWithLastTableNull() {
|
||||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
||||||
"Would you like to delete this tabular resource without table?");
|
"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>(
|
protected static final ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.name(), 90, "Name");
|
properties.name(), 90, "Name");
|
||||||
|
|
||||||
protected static final ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
protected static final ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tabResourceType(), 30, "Type");
|
properties.tabResourceType(), 30, "Type");
|
||||||
|
|
||||||
protected static final ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
protected static final ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tableTypeName(), 30, "Table Type");
|
properties.tableTypeName(), 30, "Table Type");
|
||||||
protected static final ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
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>(
|
protected static final ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.ownerLogin(), 70, "Owner");
|
properties.ownerLogin(), 70, "Owner");
|
||||||
protected static final ColumnConfig<TabResource, String> dateColumn = new ColumnConfig<TabResource, String>(
|
protected static final ColumnConfig<TabResource, String> dateColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.date(), 40, "Date");
|
properties.date(), 50, "Date");
|
||||||
|
|
||||||
protected Grid<TabResource> grid;
|
protected Grid<TabResource> grid;
|
||||||
protected ResourceBundle res;
|
protected ResourceBundle res;
|
||||||
|
@ -112,7 +110,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
buildPanel(properties.id(),
|
buildPanel(properties.id(),
|
||||||
Arrays.<ColumnConfig<TabResource, ?>> asList(nameColumn,
|
Arrays.<ColumnConfig<TabResource, ?>> asList(nameColumn,typeColumn,
|
||||||
tableTypeNameColumn, ownerColumn, agencyColumn, dateColumn),
|
tableTypeNameColumn, ownerColumn, agencyColumn, dateColumn),
|
||||||
nameColumn);
|
nameColumn);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue