/** * 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; } /**
/** * 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; } /**
RemoteSession parentSessionObject = TourGeekScreen.getRemoteSession(); try { m_remoteSession = (RemoteSession)parentSessionObject.makeRemoteSession("com.tourgeek.tour.booking.remote.booking.BookingLineSession");
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