Hello. I have two actionforms, one DomainActionForm and another DomainWebsiteActionForm.

Is there a way inside my DomainAction class to change the actionForm to point to DomainWebsiteActionForm?


I also have problems with the forwarding. I want to forward a page back to another page that uses DomainActionForm, but I just get a blank page and no Exception. So I am thinking maybe it is because my actionForm object is referred to DomainWebsiteActionForm and not DomainActionForm.

Here is a small clip of my source code for the redirect.

public ActionForward viewDomainAdminEdit(ActionMapping mapping, ActionForm actionForm,
           HttpServletRequest request, HttpServletResponse response)
           throws Exception {
       ActionForward forward = mapping.findForward("domainAdminEdit.page");

       try {
RollerSession rollerSession = RollerSession.getRollerSession(request);

request.setAttribute("websiteModel", new DomainAdminEditPageModel( "domainAdminEdit.title", request, response, mapping, null));
           if (request.getAttribute("websiteModel") == null) {
               request.setAttribute("websiteModel", actionForm);
           }
DomainAdminEditPageModel model = new DomainAdminEditPageModel( "domainAdminEdit.title", request, response, mapping, null);

           request.setAttribute("websiteModel", model);

           if (request.getAttribute("domainForm") == null) {
               request.setAttribute("domainForm", actionForm);
           }

           // Ensure user is authorized
           if (rollerSession.isGlobalAdminUser()) {
               return forward;
           } else {
               return mapping.findForward("access-denied");
           }

       } catch (Exception e) {
mLogger.error("Error in DomainAdminAction.view()"+ e + "\n" + e.getMessage());
           throw new ServletException(e);
       }
}


Regards Shervin Asgari

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to