/** * Get this record owner's parent. * Could be anotherRecordOwner or could be a Task. * @return The this record owner's parent. */ public RecordOwnerParent getParentRecordOwner() { return this.getParentScreen(); } /**
/** * Process the "Settings" toolbar command. * @return true if successful. */ public boolean onChangeSettings() { BasePanel screenParent = this.getParentScreen(); this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Map<String,Object> properties = null; this.free(); new UserPreferenceScreen(null, null, screenParent, null, ScreenConstants.MAINT_MODE, properties); return true; // Should always be successful } /**
/** * Process the "Login" toolbar command. * @return true if successful. */ public boolean onChangePassword() { BasePanel screenParent = this.getParentScreen(); this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Map<String,Object> properties = null; this.free(); new UserPasswordChange(null, null, screenParent, null, ScreenConstants.MAINT_MODE, properties); return true; // Should always be successful } /**
public Object doGetData() { Object data = super.doGetData(); if ((data == null) || (DBConstants.BLANK.equals(data))) { if (NONE_BUTTON == null) { String NONE = "None"; if (getRecord().getRecordOwner() instanceof BaseScreen) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen() != null) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen() != null) NONE_BUTTON = ((BaseApplet)((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen().getScreenFieldView().getControl()).loadImageIcon(NONE, null); } return NONE_BUTTON; } return data; } };
public Object doGetData() { Object data = super.doGetData(); if ((data == null) || (DBConstants.BLANK.equals(data))) { if (NONE_BUTTON == null) { String NONE = "None"; if (getRecord().getRecordOwner() instanceof BaseScreen) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen() != null) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen() != null) NONE_BUTTON = ((BaseApplet)((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen().getScreenFieldView().getControl()).loadImageIcon(NONE, null); } return NONE_BUTTON; } return data; } };
/** * Process the "Settings" toolbar command. * @return true if successful. */ public boolean onChangeSettings() { Record record = Record.makeRecordFromClassName(UserInfoModel.THICK_CLASS, this); this.removeRecord(record); BasePanel parentScreen = this.getParentScreen(); ScreenLocation itsLocation = this.getScreenLocation(); this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Map<String,Object> properties = null; this.free(); int docMode = record.commandToDocType(UserInfoModel.PREFERENCES_SCREEN); record.makeScreen(itsLocation, parentScreen, docMode, properties); return true; // Should always be successful } /**
/** * Display the "Logon" screen. * @return true if successful. */ public boolean onLogon() { BasePanel parentScreen = this.getParentScreen(); ScreenLocation itsLocation = this.getScreenLocation(); parentScreen.popHistory(1, false); parentScreen.pushHistory(this.getScreenURL(), false); // Update the history to my current state. this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Converter fieldConverter = null; int iDisplayFieldDesc = 0; Map<String,Object> properties = null; this.free(); new UserLoginScreen(null, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties); return true; } /**
/** * Process the "Login" toolbar command. * @return true if successful. */ public boolean onChangePassword() { Record record = Record.makeRecordFromClassName(UserInfoModel.THICK_CLASS, this); this.removeRecord(record); BasePanel parentScreen = this.getParentScreen(); ScreenLocation itsLocation = this.getScreenLocation(); this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Map<String,Object> properties = null; this.free(); int docMode = record.commandToDocType(UserInfoModel.PASSWORD_CHANGE_SCREEN); record.makeScreen(itsLocation, parentScreen, docMode, properties); return true; // Should always be successful } /**
BasePanel parent = this.getParentScreen(); int iUseSameWindow = ScreenConstants.USE_SAME_WINDOW | ScreenConstants.PUSH_TO_BROWSER; if (parent != null)
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { BaseField field = this.getOwner(); int iScreenNo = (int)field.getValue(); Record screenRecord = field.getRecord(); BaseScreen screen = (BaseScreen)screenRecord.getRecordOwner(); BasePanel parentScreen = screen.getParentScreen(); boolean bUseSameWindow = true; ScreenLocation itsLocation = screen.getScreenLocation(); screen.removeRecord(screenRecord); screen.free(); // Remove this screen parentScreen.popHistory(1, false); // Don't go back this.getSubScreen(screenRecord, itsLocation, parentScreen, null, iScreenNo); return super.fieldChanged(bDisplayOption, iMoveMode); } /**
/** * Display the "Logon" screen. * @return true if successful. */ public boolean onLogon() { Record record = Record.makeRecordFromClassName(UserInfoModel.THICK_CLASS, this); this.removeRecord(record); BasePanel parentScreen = this.getParentScreen(); ScreenLocation itsLocation = this.getScreenLocation(); parentScreen.popHistory(1, false); parentScreen.pushHistory(this.getScreenURL(), false); // Update the history to my current state. this.finalizeThisScreen(); // Validate current control, update record, get ready to close screen. Map<String,Object> properties = null; this.free(); int docMode = record.commandToDocType(UserInfoModel.LOGIN_SCREEN); record.makeScreen(itsLocation, parentScreen, docMode, properties); return true; } /**
BasePanel parent = this.getParentScreen(); int iUseSameWindow = ScreenConstants.USE_SAME_WINDOW | ScreenConstants.PUSH_TO_BROSWER; if (parent != null)
if (strMenu != null) BasePanel screenParent = this.getParentScreen(); int count = 0; while (screenParent.popHistory(1, false) != null)
BasePanel parentScreen = screen.getParentScreen(); ScreenLocation itsLocation = null; if ((iCommandOptions & ScreenConstants.USE_NEW_WINDOW) == ScreenConstants.USE_SAME_WINDOW) // Use same window
if (strMenu != null) BasePanel screenParent = this.getParentScreen(); int count = 0; while (screenParent.popHistory(1, false) != null)
if (parent != null) if (this.getScreen() != null) if (this.getScreen().getParentScreen() == parent) bRefreshIfChanged = false; // Since the screen (and record) will be closed, only need to write record recordNew.readSameRecord(recordCurrent, true, bRefreshIfChanged); // Write if it is changed if (this.getScreen().getParentScreen() == parent)
if (parent != null) if (this.getScreen() != null) if (this.getScreen().getParentScreen() == parent) bRefreshIfChanged = false; // Since the screen (and record) will be closed, only need to write record recordNew.readSameRecord(recordCurrent, true, bRefreshIfChanged); // Write if it is changed if (this.getScreen().getParentScreen() == parent)