@Override protected void onImbAutoRefreshClick() throws PresentationLogicException { if (form.getLocalContext().getbTimerOn().booleanValue()) { form.getLocalContext().setEventFired(PendingEmergencyEventFired.STOP_TIMER); form.getLocalContext().setbTimerOn(false); enableAutoRefeshStart(false); enableSearchCriteria(true); } else { form.getLocalContext().setEventFired(PendingEmergencyEventFired.START_TIMER); form.getLocalContext().setbTimerOn(true); enableAutoRefeshStop(true); enableSearchCriteria(false); } }
@Override protected void onCcPengingEmergencyAdmsValueChanged() throws PresentationLogicException { if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPengingEmergencyAdms().getEventFired() != null) { if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPengingEmergencyAdms(). getEventFired().equals(PendingEmergencyEventFired.START_TIMER)) { form.getTimers().gettimerPendingEmergency().setEnabled(true); } else if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPengingEmergencyAdms(). getEventFired().equals(PendingEmergencyEventFired.STOP_TIMER)) { form.getTimers().gettimerPendingEmergency().setEnabled(false); } } }
private void toggleTimer(boolean wasTimerOn) { boolean refreshButtonToggle = !(!Boolean.TRUE.equals(form.getLocalContext().getbTimerOn()) && form.getLocalContext().getEventFiredIsNotNull()) && !PendingEmergencyEventFired.STOP_TIMER.equals(form.getLocalContext().getEventFired()); if (wasTimerOn) { form.getLocalContext().setEventFired(PendingEmergencyEventFired.STOP_TIMER); form.getLocalContext().setbTimerOn(false); enableAutoRefreshStart(refreshButtonToggle); if (form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter() != null) form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter().setWasTimerOn(!wasTimerOn); enableSearchCriteria(true); } else { if (!validateSearchCriteria(true)) { enableAutoRefreshStart(refreshButtonToggle); form.grdAdmissions().getRows().clear(); form.lblTotal().setValue("Total: 0"); return; } form.getLocalContext().setEventFired(PendingEmergencyEventFired.START_TIMER); form.getLocalContext().setbTimerOn(true); if (form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter() != null) form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter().setWasTimerOn(!wasTimerOn); enableAutoRefreshStop(true); enableSearchCriteria(false); } form.fireCustomControlValueChanged(); updateControlsState(); }
public void leaveComponent() { if (form.getLocalContext().getbTimerOnIsNotNull() && form.getLocalContext().getbTimerOn().booleanValue()) { form.getLocalContext().setEventFired(PendingEmergencyEventFired.STOP_TIMER); form.getLocalContext().setbTimerOn(false); enableAutoRefreshStart(false); enableSearchCriteria(true); } }
@Override protected void onCcPendingEDAdmsValueChanged() throws PresentationLogicException { if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPendingEDAdms().getEventFired() != null) { if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPendingEDAdms(). getEventFired().equals(PendingEmergencyEventFired.START_TIMER)) { form.getTimers().gettimerPendingEmergency().setEnabled(true); } else if(form.lyrLists().tabPagePendingEmergencyAdmissions().ccPendingEDAdms(). getEventFired().equals(PendingEmergencyEventFired.STOP_TIMER)) { form.getTimers().gettimerPendingEmergency().setEnabled(false); } } }
public PendingEmergencyEventFired getEventFired() { return form.getLocalContext().getEventFired(); }