Package com.dotmarketing.portlets.htmlpages.struts

Examples of com.dotmarketing.portlets.htmlpages.struts.HTMLPageForm


        htmlpage.setTitle(pageName);
        htmlpage.setFriendlyName(friendlyName);

        req.setAttribute(WebKeys.HTMLPAGE_EDIT, htmlpage);

        HTMLPageForm htmlForm = new HTMLPageForm();
        htmlForm.setParent(folder.getInode());
        htmlForm.setSelectedparent(folder.getName());
        htmlForm.setSelectedparentPath(APILocator.getIdentifierAPI().find(folder).getPath());
        htmlForm.setPageUrl(pageName);
        htmlForm.setTitle(pageName);
        htmlForm.setFriendlyName(friendlyName);

        BeanUtils.copyProperties(form, htmlpage);
        BeanUtils.copyProperties(form, htmlForm);

      } catch (Exception ae) {
View Full Code Here


    // calls edit method from super class that returns parent folder
    Folder parentFolder = super._editWebAsset(req, res, config, form, user, WebKeys.HTMLPAGE_EDIT);

    // setting parent folder path and inode on the form bean
    HTMLPageForm hf = (HTMLPageForm) form;

    ActivityLogger.logInfo(this.getClass(), "editing HTMLpage action", "User " + user.getPrimaryKey() + " editing page" + hf.getTitle(), HostUtil.hostNameUtil(req, _getUser(req)));
   
    hf.setSelectedparent(parentFolder.getName());
    hf.setParent(parentFolder.getInode());
    try {
      hf.setSelectedparentPath(APILocator.getIdentifierAPI().find(parentFolder).getPath());
    } catch (Exception e) {
      Logger.info(this, e.getMessage());
    }
    // This can't be done on the WebAsset so it needs to be done here.
    HTMLPage htmlpage = (HTMLPage) req.getAttribute(WebKeys.HTMLPAGE_EDIT);
    htmlpage.setParent(parentFolder.getInode());

    // removes the extension .jsp from page url
    String pageName = htmlpage.getPageUrl();
    if (pageName != null) {
      pageName = pageName.replaceAll("." + Config.getStringProperty("VELOCITY_PAGE_EXTENSION"), "");
    }
    // to remove the page extension on the bean
    hf.setPageUrl(pageName);

  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.htmlpages.struts.HTMLPageForm

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.