Package org.apache.roller.ui.core

Examples of org.apache.roller.ui.core.BasePageModel


    {
        RollerRequest rreq = RollerRequest.getRollerRequest(request);
        WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
        WeblogCategoryFormEx form = (WeblogCategoryFormEx)actionForm;
       
        BasePageModel pageModel = null;
        WeblogCategoryData parentCat = null;
        if (null!=rreq.getWeblogCategory() && null==request.getParameter("correct"))
        {
            // If request specifies Category and we are not correcting an
            // already submitted form then load that Category into the form.
            WeblogCategoryData cd = rreq.getWeblogCategory();
            form.copyFrom(cd, request.getLocale());
            request.setAttribute("state","edit");
                            
            parentCat = cd.getParent();           
            pageModel = new BasePageModel(
                "categoryForm.edit.title", request, response, mapping);
            pageModel.setWebsite(cd.getWebsite());
        }
        else if (null != request.getParameter("correct"))
        {
            // We are correcting a previously submtted form.
            // already submitted form then load that Category into the form.
            WeblogCategoryData cd = rreq.getWeblogCategory();
            request.setAttribute("state","correcting");   
           
            parentCat = wmgr.getWeblogCategory(cd.getId());         
            pageModel = new BasePageModel(
                "categoryForm.correct.title", request, response, mapping);
            pageModel.setWebsite(cd.getWebsite());
        }
        else
        {
            // We are adding a new Category
            request.setAttribute("state","add");
           
            String pid = request.getParameter(RequestConstants.PARENT_ID);
            parentCat = wmgr.getWeblogCategory(pid);            
            form.setParentId(parentCat.getId());
           
            pageModel = new BasePageModel(
                "categoryForm.add.title", request, response, mapping);
            pageModel.setWebsite(parentCat.getWebsite());
        }
       
        // Build cat path for display on page
        if (null != parentCat)
        {
View Full Code Here


            ActionForm          actionForm,
            HttpServletRequest  request,
            HttpServletResponse response)
            throws ServletException {
       
        request.setAttribute("model", new BasePageModel(
                "maintenance.title", request, response, mapping));
        return mapping.findForward("maintenance.page");
    }
View Full Code Here

                ActionMessages messages = new ActionMessages();
                messages.add(null, new ActionMessage("maintenance.message.indexed"));
                saveMessages(request, messages);
            }
           
            request.setAttribute("model", new BasePageModel(
                    "maintenance.title", request, response, mapping));
           
        } catch (RollerException re) {
            mLogger.error("Unexpected exception",re.getRootCause());
            throw new ServletException(re);
View Full Code Here

                messages.add(null, new ActionMessage("maintenance.message.flushed"));
                saveMessages(request, messages);
               
            }
           
            request.setAttribute("model", new BasePageModel(
                    "maintenance.title", request, response, mapping));
           
        } catch (Exception e) {
            throw new ServletException(e);
        }
View Full Code Here

            throws IOException, ServletException {
       
        ActionForward forward = mapping.findForward("editPages.page");
        WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
        try {
            request.setAttribute("model", new BasePageModel(
                    "pagesForm.title", request, response, mapping));
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rses = RollerSession.getRollerSession(request);
            WebsiteData website = rreq.getWebsite();
            if ( rses.isUserAuthorizedToAdmin(website) ) {
View Full Code Here

            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            WeblogTemplate pd = (WeblogTemplate)rreq.getPage();
           
            RollerSession rses = RollerSession.getRollerSession(request);
            if ( rses.isUserAuthorizedToAdmin(pd.getWebsite()) ) {
                BasePageModel pageModel = new BasePageModel(
                        "pageForm.title", request, response, mapping);
                pageModel.setWebsite(pd.getWebsite());
                request.setAttribute("model", pageModel);
               
                WeblogTemplateForm pf = (WeblogTemplateForm)actionForm;
                pf.copyFrom(pd, request.getLocale());
               
View Full Code Here

        ActionForward forward = mapping.findForward("editPages.page");
        try {
            WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rses = RollerSession.getRollerSession(request);
            request.setAttribute("model", new BasePageModel(
                    "pagesForm.title", request, response, mapping));
           
            WebsiteData website = rreq.getWebsite();
            if (website == null && form.getId()!=null) {
                UserManager mgr = RollerFactory.getRoller().getUserManager();
View Full Code Here

            HttpServletRequest  request,
            HttpServletResponse response)
            throws IOException, ServletException {
       
        ActionForward forward = mapping.findForward("editPages");
        request.setAttribute("model", new BasePageModel(
                "pagesForm.title", request, response, mapping));
        try {
            UserManager mgr = RollerFactory.getRoller().getUserManager();
            WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
            WeblogTemplate template = mgr.getPage(form.getId());
View Full Code Here

                WeblogTemplateForm form = (WeblogTemplateForm)actionForm;
                form.copyFrom(page, request.getLocale());
               
                addModelObjects(request, response, mapping, page.getWebsite(), page);
               
                BasePageModel pageModel = new BasePageModel(
                        "editPages.title.removeOK", request, response, mapping);
                pageModel.setWebsite(website);
                request.setAttribute("model", pageModel);
               
                UserData ud = rses.getAuthenticatedUser();
                request.setAttribute("user",ud);
            } else {
View Full Code Here

               
                CacheManager.invalidate(data);
               
                addModelObjects(request, response, mapping, data.getWebsite(), data);
               
                BasePageModel pageModel = new BasePageModel(
                        "pageForm.title", request, response, mapping);
                pageModel.setWebsite(website);
                request.setAttribute("model", pageModel);
               
            } else {
                forward = mapping.findForward("access-denied");
            }
View Full Code Here

TOP

Related Classes of org.apache.roller.ui.core.BasePageModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.