@Test public final void testSwitchToEditMode() { try { MockHttpServletRequest request = new MockHttpServletRequest(); SiteEditorContext context = new SiteEditorContext(new Site()); request.getSession().setAttribute(SiteController.EDITOR_CONTEXT, context); testInstance.switchToEditMode(request); context = testInstance.getEditorContext(request); assertTrue(context.isEditMode()); } catch (Exception e) { String message = e.getClass().toString() + " - " + e.getMessage(); log.debug(message); fail(message); } }
@Override protected void switchToEditMode(HttpServletRequest req) { getEditorContext(req).setEditMode(true); bindEditorContext(req, getEditorContext(req)); }
SiteController extends TabbedController { @Override protected void switchToEditMode(HttpServletRequest req) { getEditorContext(req).setEditMode(true); bindEditorContext(req, getEditorContext(req)); } }
SiteController extends TabbedController { @Override protected void switchToEditMode(HttpServletRequest req) { getEditorContext(req).setEditMode(true); bindEditorContext(req, getEditorContext(req)); } SiteController(); }
SiteController extends TabbedController { @Override protected void switchToEditMode(HttpServletRequest req) { getEditorContext(req).setEditMode(true); bindEditorContext(req, getEditorContext(req)); } SiteController(); void bindEditorContext(HttpServletRequest req, SiteEditorContext context); void unbindEditorContext(HttpServletRequest req); SiteEditorContext getEditorContext(HttpServletRequest req); void checkSave(HttpServletRequest req, BindException errors); ModelAndView getErrorsView(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors); void setSiteManager(SiteManager siteManager); void setAuthorityManager(AuthorityManager authorityManager); void setBusinessObjectFactory(BusinessObjectFactory businessObjectFactory); void setMessageSource(MessageSource messageSource); void setSiteSearchController(SiteSearchController siteSearchController); }
SiteController extends TabbedController { @Override protected void switchToEditMode(HttpServletRequest req) { getEditorContext(req).setEditMode(true); bindEditorContext(req, getEditorContext(req)); } SiteController(); void bindEditorContext(HttpServletRequest req, SiteEditorContext context); void unbindEditorContext(HttpServletRequest req); SiteEditorContext getEditorContext(HttpServletRequest req); void checkSave(HttpServletRequest req, BindException errors); ModelAndView getErrorsView(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors); void setSiteManager(SiteManager siteManager); void setAuthorityManager(AuthorityManager authorityManager); void setBusinessObjectFactory(BusinessObjectFactory businessObjectFactory); void setMessageSource(MessageSource messageSource); void setSiteSearchController(SiteSearchController siteSearchController); static final String EDITOR_CONTEXT; }