You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB
Java

/**
*
*/
package org.gcube.portlets.user.td.codelistmappingimportwidget.client;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.Command;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CodelistMappingUploadFileCard extends WizardCard {
protected CSVImportSession importSession;
protected CodelistMappingFileUploadPanel fileUploadPanel;
protected CodelistMappingUploadFileCard thisCard;
public CodelistMappingUploadFileCard(final CSVImportSession importSession) {
super("Codelist Mapping Import File Upload", "");
this.thisCard = this;
this.importSession = importSession;
this.fileUploadPanel = new CodelistMappingFileUploadPanel(res, thisCard,importSession);
setContent(fileUploadPanel);
}
@Override
public void setup() {
Command sayNextCard = new Command() {
public void execute() {
CodelistMappingTableDetailCard detailsCard = new CodelistMappingTableDetailCard(importSession);
getWizardWindow().addCard(detailsCard);
Log.info("NextCard CodelistMappingTableDetailCard");
getWizardWindow().nextCard();
}
};
getWizardWindow().setNextButtonCommand(sayNextCard);
Command sayPreviousCard = new Command() {
public void execute() {
try {
getWizardWindow().previousCard();
getWizardWindow().removeCard(thisCard);
Log.info("Remove CSVUploadFileCard");
} catch (Exception e) {
Log.error("sayPreviousCard :" + e.getLocalizedMessage());
}
}
};
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
getWizardWindow().setEnableNextButton(false);
}
}