RemoteTable bookingDetailSession = (RemoteTable)remoteSession.doRemoteAction(BookingConstants.GET_DETAIL_COMMAND, properties); Object objReturn = bookingDetailSession.doRemoteAction(SearchConstants.ADD_COMMAND, properties); if (strDate != null)
/** * Handle the command send from my client peer. * @param in The (optional) Inputstream to get the params from. * @param out The stream to write the results. */ public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { String strCommand = this.getProperty(REMOTE_COMMAND, properties); if (GET_REMOTE_TABLE.equals(strCommand)) { String strName = this.getNextStringParam(in, NAME, properties); RemoteTable remoteTable = ((RemoteSession)m_remoteObject).getRemoteTable(strName); // First, see if this is in my list already? String strID = this.find(remoteTable); if (strID == null) strID = this.add(new TableHolder(this, remoteTable)); this.setReturnString(out, strID); } else if (SETUP_REMOTE_SESSION_FILTER.equals(strCommand)) { org.jbundle.thin.base.message.BaseMessageFilter filter = (org.jbundle.thin.base.message.BaseMessageFilter)this.getNextObjectParam(in, FILTER, properties); filter = ((RemoteSession)m_remoteObject).setupRemoteSessionFilter(filter); this.setReturnObject(out, filter); } else super.doProcess(in, out, properties); } }
/** * Get the remote session. */ public RemoteSession getRemoteSession(FieldList recBookingDetail) { if (m_remoteSession == null) if (recBookingDetail != null) { String strDetailType = recBookingDetail.getClass().getName(); strDetailType = strDetailType.substring(strDetailType.lastIndexOf('.') + 1); TourGeekScreen TourGeekScreen = (TourGeekScreen)this.getTargetScreen(TourGeekScreen.class); RemoteSession parentSessionObject = TourGeekScreen.getRemoteSession(); try { m_remoteSession = (RemoteSession)parentSessionObject.makeRemoteSession("com.tourgeek.tour.booking.remote.booking.detail." + strDetailType + "Session"); } catch (RemoteException ex) { ex.printStackTrace(); } } return m_remoteSession; } /**
remoteSession.doRemoteAction(SearchConstants.SELECT_GRID, null); } catch (Exception ex) { ex.printStackTrace(); remoteTable = remoteSession.getRemoteTable(strTableName); record = remoteTable.makeFieldList(null); record.setOwner(this);
RemoteTable remoteTable = m_remoteSession.getRemoteTable(null); // Main table (BookingMenuLookup)
remoteFilter = remoteSession.setupRemoteSessionFilter(remoteFilter); // This has the effect of calling: messageFilter.linkRemoteSession(remoteSession);
/** * Process this action. * @param strAction The action to process. * By default, this method handles RESET, SUBMIT, and DELETE. */ public boolean doAction(String strAction, int iOptions) { if (GET_RATE.equalsIgnoreCase(strAction)) { Map properties = new HashMap(); this.addScreenFieldProperty(properties, "HotelID", "HotelID"); this.addScreenFieldProperty(properties, "HotelRate", "HotelRate"); this.addScreenFieldProperty(properties, "HotelClass", "HotelClass"); this.addScreenFieldProperty(properties, "StartDate", "StartDate"); try { //+ synchronized(m_remoteSession) { m_remoteSession.doRemoteAction(strAction, properties); } } catch (Exception ex) { ex.printStackTrace(); } } return super.doAction(strAction, iOptions); } /**
/** * Make the remote session. */ public RemoteSession createRemoteSession(JBaseScreen parentScreen) { RemoteSession remoteSession = null; if (parentScreen == null) return null; RemoteSession parentSessionObject = ((JMainSearchPane)parentScreen).getTourGeekScreen().getRemoteSession(); String strTableName = this.getRemoteTableName(); if (strTableName != null) { String strRemoteSession = "com.tourgeek.tour.product.remote.search." + strTableName + "SearchSession"; try { remoteSession = (RemoteSession)parentSessionObject.makeRemoteSession(strRemoteSession); // RemoteTable remoteTable = remoteSession.getRemoteTable(strTableName); // this.setFieldList(remoteTable.makeFieldList(null)); // remoteTable = new com.tourgeek.thin.base.db.client.CachedRemoteTable(remoteTable); // new com.tourgeek.thin.base.db.client.RemoteFieldTable(this.getFieldList(), remoteTable, applet); } catch (RemoteException ex) { ex.printStackTrace(); } } return remoteSession; } /**
Object objReturn = this.getRemoteSession().doRemoteAction(SearchConstants.REQUERY_COMMAND, properties); Boolean boolSuccess = null; if (objReturn instanceof Boolean)
RemoteSession parentSessionObject = TourGeekScreen.getRemoteSession(); try { m_remoteSession = (RemoteSession)parentSessionObject.makeRemoteSession("com.tourgeek.tour.booking.remote.booking.BookingLineSession");
return false; recBooking.getTable().addNew(); Object objSuccess = this.getRemoteSession().doRemoteAction(Constants.DELETE, null); // Tell the remote session that I'm done with this booking if (objSuccess instanceof Boolean) bSuccess = ((Boolean)objSuccess).booleanValue();
RemoteSession parentSessionObject = TourGeekScreen.getRemoteSession(); try { m_remoteSession = (RemoteSession)parentSessionObject.makeRemoteSession("com.tourgeek.tour.booking.remote.booking.BookingPaxSession"); record = new BookingPax(this); ((BookingPax)record).getField(BookingPax.PAX_CATEGORY_ID).setDefault(new Integer(PaxCategory.DOUBLE_ID)); // Room type defaults to double
properties.put(Params.FIELD + "1", Currencys.CURRENCYS_FILE + '.' + Currencys.DESCRIPTION); properties.put(Params.FIELD + "2", Currencys.CURRENCYS_FILE + '.' + Currencys.CURRENCY_CODE); Object objProperties = this.getRemoteSession(null).doRemoteAction(Params.GET_FIELD_DATA, properties); if (objProperties instanceof Map)
this.getRemoteSession().doRemoteAction(Constants.RESET, null); // Tell the remote session that I'm done with this booking this.getTourRecord().getTable().addNew(); // Clear tour record bSuccess = true;
remoteSession.doRemoteAction(SearchConstants.SELECT_MAINT, null);
FieldList recBookingDetail = null; try { bookingDetailSession = (RemoteTable)m_remoteSession.doRemoteAction(BookingConstants.GET_DETAIL_COMMAND, null); recBookingDetail = bookingDetailSession.makeFieldList(BookingConstants.SELECTED); } catch (Exception ex) {