@Test public final void testShowForm() { try { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); DefaultSiteCommand comm = new DefaultSiteCommand(); comm.setEditMode(true); comm.setSiteOid(null); BindException aError = new BindException(new DefaultSiteCommand(), null); ModelAndView mav = testInstance.showForm(request, response, comm, aError); assertTrue(mav != null); assertTrue(mav.getViewName().equals("site")); SiteEditorContext context = testInstance.getEditorContext(request); assertSame(context.getSite().getOwningAgency(), AuthUtil.getRemoteUserObject().getAgency()); } catch (Exception e) { String message = e.getClass().toString() + " - " + e.getMessage(); log.debug(message); fail(message); } }
@Override protected ModelAndView showForm(HttpServletRequest req, HttpServletResponse res, Object comm, BindException bex) throws Exception { log.debug("------------------------showForm-------------------------------"); return processInitial(req, res, comm, bex); }
SiteController extends TabbedController { @Override protected ModelAndView showForm(HttpServletRequest req, HttpServletResponse res, Object comm, BindException bex) throws Exception { log.debug("------------------------showForm-------------------------------"); return processInitial(req, res, comm, bex); } }
SiteController extends TabbedController { @Override protected ModelAndView showForm(HttpServletRequest req, HttpServletResponse res, Object comm, BindException bex) throws Exception { log.debug("------------------------showForm-------------------------------"); return processInitial(req, res, comm, bex); } SiteController(); }
SiteController extends TabbedController { @Override protected ModelAndView showForm(HttpServletRequest req, HttpServletResponse res, Object comm, BindException bex) throws Exception { log.debug("------------------------showForm-------------------------------"); return processInitial(req, res, comm, bex); } 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 ModelAndView showForm(HttpServletRequest req, HttpServletResponse res, Object comm, BindException bex) throws Exception { log.debug("------------------------showForm-------------------------------"); return processInitial(req, res, comm, bex); } 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; }