private void enableButtons() { ElectronicPrescribingConfigVoCollection voColl = domain.listElectronicPrescribing(); form.getLocalContext().setLocalElectronicPrescribingConfigVoCollection(voColl); for (int i = 0 ; voColl != null && i < voColl.size() ; i++) { switch(voColl.get(i).getButton().getID()) { case IPBUTTONONE: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton1(), form.lblLabel1(), voColl.get(i)); break; case IPBUTTONTWO: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton2(), form.lblLabel2(), voColl.get(i)); break; case IPBUTTONTHREE: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton3(), form.lblLabel3(), voColl.get(i)); break; case IPBUTTONFOUR: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton4(), form.lblLabel4(), voColl.get(i)); break; } } }
private void populateGrid(ElectronicPrescribingConfigVoCollection listElectronicPrescribing) { if (listElectronicPrescribing == null) return; for (int i = 0 ; i < listElectronicPrescribing.size() ; i++) { for ( int j = 0 ; j < form.grdDetails().getRows().size() ; j++) { if (form.grdDetails().getRows().get(j).getValue() instanceof ElectronicPrescribingButton && form.grdDetails().getRows().get(j).getValue().equals(listElectronicPrescribing.get(i).getButton()) ) { grdDetailsRow row = form.grdDetails().getRows().get(j); row.setColButtonText(listElectronicPrescribing.get(i).getButtonText()); row.setTooltipForColButtonText(listElectronicPrescribing.get(i).getButtonText()); row.setColLabelText(listElectronicPrescribing.get(i).getLabelText()); row.setTooltipForColLabelText(listElectronicPrescribing.get(i).getLabelText()); row.setColExePath(listElectronicPrescribing.get(i).getButtonExecutablePath()); row.setTooltipForColExePath(listElectronicPrescribing.get(i).getButtonExecutablePath()); row.setColParameter(listElectronicPrescribing.get(i).getButtonParameter()); row.setTooltipForColParameter(listElectronicPrescribing.get(i).getButtonParameter()); row.setColRoles(createRolesText(listElectronicPrescribing.get(i).getButtonDeniedRoleAccess())); row.setTooltipForColRoles(createRolesText(listElectronicPrescribing.get(i).getButtonDeniedRoleAccess())); row.setValue(listElectronicPrescribing.get(i)); } } } }
private void enableButtons() { ElectronicPrescribingConfigVoCollection voColl = domain.listElectronicPrescribing(); form.getLocalContext().setLocalElectronicPrescribingConfigVoCollection(voColl); for (int i = 0 ; voColl != null && i < voColl.size() ; i++) { switch(voColl.get(i).getButton().getID()) { case BUTTONONE: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton1(), form.lblLabel1(), voColl.get(i)); break; case BUTTONTWO: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton2(), form.lblLabel2(), voColl.get(i)); break; case BUTTONTHREE: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton3(), form.lblLabel3(), voColl.get(i)); break; case BUTTONFOUR: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton4(), form.lblLabel4(), voColl.get(i)); break; case BUTTONFIVE: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton5(), form.lblLabel5(), voColl.get(i)); break; case BUTTONSIX: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton6(), form.lblLabel6(), voColl.get(i)); break; case BUTTONSEVEN: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton7(), form.lblLabel7(), voColl.get(i)); break; case BUTTONEIGHT: enableAndShowButton(checkRole(voColl.get(i).getButtonDeniedRoleAccess()), true, form.btnButton8(), form.lblLabel8(), voColl.get(i)); break; } } }