try {
RowKey rowKey = tripDataProvider.appendRow();
tripDataProvider.setCursorRow(rowKey);
Integer tid = nextPK();
tripDataProvider.setValue("TRIP.TRIPID", rowKey, tid);
Integer pid = getSessionBean1().getCurrentPersonId();
tripDataProvider.setValue("TRIP.PERSONID", rowKey, pid);
java.util.Date depDate = (java.util.Date) dateCal.getValue();
if ( depDate != null ) {
java.sql.Date date = new java.sql.Date(depDate.getTime());
tripDataProvider.setValue("TRIP.DEPDATE", rowKey, date);
}
tripDataProvider.setValue("TRIP.DEPCITY", rowKey, fromCityField.getValue());
tripDataProvider.setValue("TRIP.DESTCITY", rowKey, toCityField.getValue());
tripDataProvider.setValue("TRIP.TRIPTYPEID", rowKey, tripTypeDD.getSelected());
tripDataProvider.commitChanges();
} catch (Exception e) {
error("Cannot append new trip: " + e);
}
RowKey rowKey = tripDataProvider.appendRow();
tripDataProvider.setCursorRow(rowKey);
Integer tid = nextPK();
tripDataProvider.setValue("TRIP.TRIPID", rowKey, tid);
Integer pid = getSessionBean1().getCurrentPersonId();
tripDataProvider.setValue("TRIP.PERSONID", rowKey, pid);
java.util.Date depDate = (java.util.Date) dateCal.getValue();
if ( depDate != null ) {
java.sql.Date date = new java.sql.Date(depDate.getTime());
tripDataProvider.setValue("TRIP.DEPDATE", rowKey, date);
}
tripDataProvider.setValue("TRIP.DEPCITY", rowKey, fromCityField.getValue());
tripDataProvider.setValue("TRIP.DESTCITY", rowKey, toCityField.getValue());
tripDataProvider.setValue("TRIP.TRIPTYPEID", rowKey, tripTypeDD.getSelected());
tripDataProvider.commitChanges();
} catch (Exception e) {
error("Cannot append new trip: " + e);
}