use of org.pentaho.di.ui.trans.step.TableItemInsertListener in project pentaho-kettle by pentaho.
the class PGBulkLoaderDialog method getUpdate.
private void getUpdate() {
try {
RowMetaInterface r = transMeta.getPrevStepFields(stepname);
if (r != null) {
TableItemInsertListener listener = new TableItemInsertListener() {
public boolean tableItemInserted(TableItem tableItem, ValueMetaInterface v) {
if (v.getType() == ValueMetaInterface.TYPE_DATE) {
// The default is date mask.
tableItem.setText(3, BaseMessages.getString(PKG, "PGBulkLoaderDialog.DateMask.Label"));
} else {
tableItem.setText(3, "");
}
return true;
}
};
BaseStepDialog.getFieldsFromPrevious(r, wReturn, 1, new int[] { 1, 2 }, new int[] {}, -1, -1, listener);
}
} catch (KettleException ke) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "PGBulkLoaderDialog.FailedToGetFields.DialogTitle"), BaseMessages.getString(PKG, "PGBulkLoaderDialog.FailedToGetFields.DialogMessage"), ke);
}
}
use of org.pentaho.di.ui.trans.step.TableItemInsertListener in project pentaho-kettle by pentaho.
the class LDAPOutputDialog method getUpdate.
private void getUpdate() {
try {
RowMetaInterface r = transMeta.getPrevStepFields(stepname);
if (r != null) {
TableItemInsertListener listener = new TableItemInsertListener() {
public boolean tableItemInserted(TableItem tableItem, ValueMetaInterface v) {
tableItem.setText(3, "Y");
return true;
}
};
BaseStepDialog.getFieldsFromPrevious(r, wReturn, 1, new int[] { 1, 2 }, new int[] {}, -1, -1, listener);
}
} catch (KettleException ke) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "LDAPOutputUpdateDialog.FailedToGetFields.DialogTitle"), BaseMessages.getString(PKG, "LDAPOutputUpdateDialog.FailedToGetFields.DialogMessage"), ke);
}
}
use of org.pentaho.di.ui.trans.step.TableItemInsertListener in project pentaho-kettle by pentaho.
the class RssOutputDialog method get.
private void get(TableView wTable) {
try {
RowMetaInterface r = transMeta.getPrevStepFields(stepname);
if (r != null) {
TableItemInsertListener listener = new TableItemInsertListener() {
public boolean tableItemInserted(TableItem tableItem, ValueMetaInterface v) {
return true;
}
};
BaseStepDialog.getFieldsFromPrevious(r, wTable, 1, new int[] { 1, 2 }, new int[] {}, -1, -1, listener);
}
} catch (KettleException ke) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "RssOutputDialog.UnableToGetFieldsError.DialogTitle"), BaseMessages.getString(PKG, "RssOutputDialog.UnableToGetFieldsError.DialogMessage"), ke);
}
}
Aggregations