private void populateNavCombo() { form.cmbNavs().clear(); AppNavShortVoCollection coll = domain.listNavigations(); for (int i = 0; i < coll.size(); i++) { form.cmbNavs().newRow( coll.get(i), coll.get(i).getNavigationName()); } }
private void open() { AppNavShortVoCollection coll = domain.listNavigations(); form.getLocalContext().setAllNavs(coll); AppFormVoCollection formColl = domain.listNavigableForms(); form.getLocalContext().setAllForms(formColl); populateNavGrid(coll); // populate the assessment grid based on flag value if( ! ConfigFlag.GEN.ENABLE_ASSESSMENTS_IN_NAV_CFG.getValue()) { form.lblAssessmentLabel().setVisible(false); form.grdAssessments().setVisible(false); } else { // It is possible that the ENABLE_ASSESSMENTS_IN_NAV_CFG config flag may be set wrong. // This will cause a crash in the domain.listAssessments() function if UserAssessment // is not mapped. Catch the exception and ask the user to correct the flag value. try { populateAssessmentGrid(); } catch ( DomainRuntimeException e ) { engine.showMessage("Please ask an administrator to check the value of the ENABLE_ASSESSMENTS_IN_NAV_CFG flag. It should be false. "); setFormMode(FormMode.VIEW); } } }
private void populateNavGrid(AppNavShortVoCollection coll) { form.grdList().getRows().clear(); for (int i = 0; i < coll.size(); i++) { AppNavShortVo nav = coll.get(i); if (nav.getIsActive() != null && !nav.getIsActive().booleanValue() && form.chkActiveOnly().getValue()) continue; grdListRow row = form.grdList().getRows().newRow(); row.setValue(nav); row.setActive(nav.getIsActive().booleanValue()); row.setName(nav.getNavigationName()); } setFormMode(FormMode.VIEW); }
private void populateNavigationsList(AppNavShortVoCollection navigations) { form.grdList().getRows().clear(); if (navigations == null) { return; } for (int i = 0; i < navigations.size(); i++) { grdListRow nRow = form.grdList().getRows().newRow(); nRow.setName(navigations.get(i).getNavigationName()); nRow.setActive(navigations.get(i).getIsActive()); nRow.setValue(navigations.get(i)); } }
public AppNavShortVoCollection listNavigations(Boolean onlyActive) { String query = "from AppNavigation as an"; ArrayList<String> params = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (onlyActive){ query+=" where (an.isActive = :activeOnly)"; params.add("activeOnly"); values.add(onlyActive); } return AppNavShortVoAssembler.createAppNavShortVoCollectionFromAppNavigation(getDomainFactory().find(query,params,values)); }
public AppNavShortVoCollection listNavigations(Boolean onlyActive) { String query = "from AppNavigation as an"; ArrayList<String> params = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (onlyActive){ query+=" where (an.isActive = :activeOnly)"; params.add("activeOnly"); values.add(onlyActive); } query += " order by upper(an.navigationName) asc"; //WDEV-20232 return AppNavShortVoAssembler.createAppNavShortVoCollectionFromAppNavigation(getDomainFactory().find(query,params,values)); }
public AppNavShortVoCollection listNavigations() { return AppNavShortVoAssembler.createAppNavShortVoCollectionFromAppNavigation(getDomainFactory().find(" from AppNavigation nav where nav.isActive = :isActive", new String[]{"isActive"}, new Object[]{Boolean.TRUE})).sort(); }
public AppNavShortVoCollection listNavigations() { return AppNavShortVoAssembler.createAppNavShortVoCollectionFromAppNavigation(getDomainFactory().find(" from AppNavigation ")).sort(); }