public int setPax(int iPax) { return m_recMain.getField(Booking.PAX).setValue(iPax); } /**
/** * Handle the message. */ public int handleMessage(BaseMessage message) { System.out.println("message: " + message); Double dblRate = (Double)message.get("hotelCost"); if (dblRate != null) // Display the rate this.getFieldList().getField("RoomPrice").setValue(dblRate.doubleValue()); return Constants.NORMAL_RETURN; } /**
/** * Set the data in this field to true or false. */ public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { Boolean objData = new Boolean(bState); if (this.getDataClass() == Boolean.class) return this.setData(objData, bDisplayOption, iMoveMode); else if (Number.class.isAssignableFrom(this.getDataClass())) return this.setValue(objData.booleanValue() ? 1 : 0, bDisplayOption, iMoveMode); else if (this.getDataClass() == String.class) return this.setString(objData.booleanValue() ? Constants.TRUE : Constants.FALSE, bDisplayOption, iMoveMode); return super.setState(bState, bDisplayOption, iMoveMode); } /**
try { m_recUserGroup.addNew(); m_recUserGroup.getCounterField().setValue(iGroupID); if (m_recUserGroup.seek(null))
try { m_recUserGroup.addNew(); m_recUserGroup.getCounterField().setValue(iGroupID); if (m_recUserGroup.seek(null))
/** * Get the next record (return a null at EOF). * Note: Remember to set the data source before returning a NORMAL_RETURN. * @param iRelPosition The relative records to move. * @return A record status (NORMAL_RETURN means the move was successful). */ public int doMove(int iRelPosition) throws DBException { if (m_iCurrentRecord == -1) { // Send fake "New Booking" Icon only on the first access. addNew(); FieldList recBooking = getRecord(); recBooking.getField(Booking.ID).setValue(0, Constants.DISPLAY, Constants.READ_MOVE); recBooking.getField(Booking.DESCRIPTION).setString("New Booking", Constants.DISPLAY, Constants.READ_MOVE); fieldsToData(recBooking); m_iCurrentRecord++; m_iRecordsAccessed++; return Constants.NORMAL_RETURN; // This is already the current record } return super.doMove(iRelPosition); } };
field.setValue(m_iCounter++, Constants.DONT_DISPLAY, Constants.READ_MOVE); // ReadMove keeps this method from being called again