public String getSelectedSectionId() { if (selectedSectionId == null) { for (Section section : sectionManager.getSections()) { if (section.isVisible()) { selectedSectionId = section.getId(); break; } } } return selectedSectionId; }
public NextServerSession(Request request) { super(request); Injector.get().inject(this); sectionContexts = new HashMap<String, SectionContext>(); List<Section> sections = sectionManager.getSections(); for (Section section : sections) { sectionContexts.put(section.getId(), SectionContextFactory.createSectionContext(section)); } // if (!sections.isEmpty()) { // selectedSectionId = sections.get(0).getId(); // } String language = storageService.getSettings().getLanguage(); Locale locale = LanguageManager.getInstance().getLocale(language); setLocale(locale); LOG.info("--------------------> Set locale to: " + language); }