[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms/admin  ...
From:       Roy Russo <russo () jboss ! com>
Date:       2005-09-30 19:46:00
Message-ID: E1ELQpU-0000wi-Lf () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]

  User: russo   
  Date: 05/09/30 15:46:00

  Modified:    core/src/main/org/jboss/portal/core/portlet/cms/admin 
                        CMSAdminPortlet.java
  Log:
  adding folderbrowser component
  
  Revision  Changes    Path
  1.6       +23 -0     \
jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CMSAdminPortlet.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/portlet/cms/admin/CMSAdminPortlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- CMSAdminPortlet.java	30 Sep 2005 03:54:50 -0000	1.5
  +++ CMSAdminPortlet.java	30 Sep 2005 19:46:00 -0000	1.6
  @@ -107,8 +107,14 @@
         else if(CMSAdminConstants.OP_UPLOADCONFIRM.equals(op))
         {
            String sPath = rReq.getParameter("path");
  +         String sNavPath = rReq.getParameter("navpath");
  +
  +         List folders = this.getFolderList(sNavPath);
  +
  +         rReq.setAttribute("folders", folders);
            rRes.setContentType("text/html");
            rReq.setAttribute("currpath", sPath);
  +         rReq.setAttribute("navpath", sNavPath);
            javax.portlet.PortletRequestDispatcher prd = \
getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + \
"/upload.jsp");  prd.include(rReq, rRes);
         }
  @@ -231,4 +237,21 @@
            aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
         }
      }
  +
  +   /**
  +    * Fetches folder tree for given path. Used in navigable folder tree component \
in ui.  +    *
  +    * @param sNavPath
  +    * @return
  +    */
  +   private List getFolderList(String sNavPath)
  +   {
  +      if (sNavPath == null)
  +      {
  +         sNavPath = "/";
  +      }
  +      Command listCMD = \
CMSService.getCommandFactory().createFolderGetListCommand(sNavPath);  +      Folder \
mainFolder = (Folder) CMSService.execute(listCMD);  +      return \
mainFolder.getFolders();  +   }
   }
  
  
  


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic