xlawrence    2005/07/11 17:00:16 CEST

  Modified files:
    src/view/jsp         eventlistener.jsp 
    src/view/jsp/include blog_declarations.inc blog_list.inc 
  Log:
  Fix to support M2 Hibernate version + refactoring of ParamBean
  
  Revision  Changes    Path
  1.8       +13 -13    corporate_portal_templates/src/view/jsp/eventlistener.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/eventlistener.jsp.diff?r1=1.7&r2=1.8&f=h
  1.5       +2 -2      
corporate_portal_templates/src/view/jsp/include/blog_declarations.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_declarations.inc.diff?r1=1.4&r2=1.5&f=h
  1.6       +4 -4      
corporate_portal_templates/src/view/jsp/include/blog_list.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_list.inc.diff?r1=1.5&r2=1.6&f=h
  
  
  
  Index: eventlistener.jsp
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/eventlistener.jsp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- eventlistener.jsp 9 Jun 2005 15:00:28 -0000       1.7
  +++ eventlistener.jsp 11 Jul 2005 15:00:15 -0000      1.8
  @@ -29,7 +29,7 @@
   
   String eventName = (String) request.getAttribute("eventName");
   JahiaEvent jahiaEvent = (JahiaEvent) request.getAttribute("jahiaEvent");
  -ParamBean jParams = jahiaEvent.getParams();
  +ProcessingContext jParams = jahiaEvent.getProcessingContext();
   org.apache.log4j.Logger logger =
       org.apache.log4j.Logger.getLogger(getClass());
   // All theses constants are from ManageCategories Engine
  @@ -44,7 +44,7 @@
   if ( eventsToTrap.contains(eventName)){
     logger.debug("Found event we listen to : " + eventName + ", 
processing...");
   
  -    HashMap engineMap = (HashMap) jParams.getSession().getAttribute( 
"jahia_session_engineMap" );
  +    HashMap engineMap = (HashMap) jParams.getSessionState().getAttribute( 
"jahia_session_engineMap" );
   
       if (engineMap == null) {
         logger.debug("No engineMap found, aborting processing");
  @@ -80,10 +80,10 @@
               JahiaPageEngineTempBean pageBean = null;
   
               HashMap pageBeans = (HashMap)jParams.
  -                    getSession().getAttribute("Page_Field.PageBeans");
  +                    getSessionState().getAttribute("Page_Field.PageBeans");
               if ( pageBeans == null ){
                   pageBeans = new HashMap();
  -                jParams.getSession().setAttribute("Page_Field.PageBeans", 
pageBeans);
  +                
jParams.getSessionState().setAttribute("Page_Field.PageBeans", pageBeans);
               }
   
               // Verify if this page field was not already edited in this 
session.
  @@ -104,7 +104,7 @@
                       logger.debug("pageDef ID is [" + pageDef.getID() + "]");
   
                       // First call or recall of engine.
  -                    
jParams.getSession().removeAttribute(SelectPage_Engine.SESSION_PARAMS);
  +                    
jParams.getSessionState().removeAttribute(SelectPage_Engine.SESSION_PARAMS);
                       if (theField.getObject() == null) { // Is it a new page ?
                           logger.debug("First call or recall of engine. This 
is a new page");
                           boolean isLinkOnly = 
theField.getValue().toLowerCase().indexOf("jahia_linkonly") != -1;
  @@ -220,11 +220,11 @@
               JahiaPageEngineTempBean pageBean = null;
   
               HashMap pageBeans = (HashMap)jParams.
  -                    getSession().getAttribute("Page_Field.PageBeans");
  +                    getSessionState().getAttribute("Page_Field.PageBeans");
               if ( pageBeans == null ){
                   pageBeans = new HashMap();
                   jParams.
  -                    getSession().setAttribute("Page_Field.PageBeans", 
pageBeans);
  +                    getSessionState().setAttribute("Page_Field.PageBeans", 
pageBeans);
               }
   
               // Verify if this page field was not already edited in this 
session.
  @@ -240,7 +240,7 @@
                   .lookupPageTemplateByName ("Document Detail", 
jParams.getSiteID());
   
                   // First call or recall of engine.
  -                
jParams.getSession().removeAttribute(SelectPage_Engine.SESSION_PARAMS);
  +                
jParams.getSessionState().removeAttribute(SelectPage_Engine.SESSION_PARAMS);
                   if (theField.getObject() == null) { // Is it a new page ?
                       boolean isLinkOnly = 
theField.getValue().toLowerCase().indexOf("jahia_linkonly") != -1;
                       pageBean = new JahiaPageEngineTempBean(
  @@ -271,15 +271,15 @@
   
               String operation = jParams.getParameter("operation"); // Value 
from FORM
               int selectedPageID = pageBean.getPageLinkID();
  -            if (jParams.getRequest().getParameter("shouldSetPageLinkID") != 
null) {
  +            if (jParams.getParameter("shouldSetPageLinkID") != null) {
                   selectedPageID = SelectPage_Engine.getInstance()
  -                            .getSelectedPageID(jParams.getSession());
  +                            .getSelectedPageID(jParams.getSessionState());
               }
   
               // check if the current page it a moved one
               if ( Page_Field.MOVE_PAGE.equals(operation) ){
  -                Integer previousPageID = (Integer)jParams.getRequest()
  -                    .getAttribute("eventlistener.previousPageID");
  +                Integer previousPageID = (Integer)jParams.
  +                    getAttribute("eventlistener.previousPageID");
   
                   if ( previousPageID == null
                       || previousPageID.intValue() != selectedPageID ){
  @@ -489,7 +489,7 @@
           } else if ( "addContainerEngineBeforeSave".equals(eventName) ) {
               // we want set the page title
                   HashMap pageBeans = (HashMap)jParams.
  -                    getSession().getAttribute("Page_Field.PageBeans");
  +                    getSessionState().getAttribute("Page_Field.PageBeans");
                   if ( pageBeans != null ){
                       // Verify if this page field was not already edited in 
this session.
                       JahiaPageEngineTempBean pageBean =
  
  
  
  Index: blog_declarations.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/blog_declarations.inc,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- blog_declarations.inc     1 Jun 2005 12:45:20 -0000       1.4
  +++ blog_declarations.inc     11 Jul 2005 15:00:16 -0000      1.5
  @@ -207,7 +207,7 @@
   public ArrayList buildCategoryTree (ArrayList categories, Category 
currentCategory)
   throws JahiaException {
       if ( currentCategory != null ){
  -        ArrayList childCategories = currentCategory.getChildCategories();
  +        List childCategories = currentCategory.getChildCategories();
           Iterator childIter = childCategories.iterator();
           while (childIter.hasNext()) {
               Category curChildCategory = (Category) childIter.next();
  @@ -222,7 +222,7 @@
   
   // get all categories
   Category rootCategory = Category.getRootCategory();
  -ArrayList categoriesAL = buildCategoryTree (new ArrayList(), rootCategory);
  +List categoriesAL = buildCategoryTree (new ArrayList(), rootCategory);
   Collections.sort(categoriesAL);
   
   
  
  
  
  Index: blog_list.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/blog_list.inc,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- blog_list.inc     1 Jun 2005 12:45:20 -0000       1.5
  +++ blog_list.inc     11 Jul 2005 15:00:16 -0000      1.6
  @@ -26,16 +26,16 @@
               JahiaPageDefinition pageDef =
                   ServicesRegistry.getInstance().getJahiaPageTemplateService()
                       .lookupPageTemplateByName ("Blog", jParams.getSiteID());
  -            Vector blogPagesId = 
JahiaPageBaseService.getInstance().getPageIDsWithTemplate(pageDef.getID());
  -            Enumeration blogPagesIdEnum= blogPagesId.elements();
  +            List blogPagesId = 
JahiaPageBaseService.getInstance().getPageIDsWithTemplate(pageDef.getID());
  +            final Iterator blogPagesIdIter = blogPagesId.iterator();
               request.removeAttribute("entries_filter_handler");
               request.removeAttribute("entries_sort_handler");
   
               ArrayList blogKeys = new ArrayList();
               Hashtable blogKeyToBlogPage = new Hashtable();
   
  -            while (blogPagesIdEnum.hasMoreElements()) {
  -                int blogPageId = ((Integer) 
blogPagesIdEnum.nextElement()).intValue();
  +            while (blogPagesIdIter.hasNext()) {
  +                int blogPageId = ((Integer) 
blogPagesIdIter.next()).intValue();
                   ContentPage blogContentPage = 
ContentPage.getPage(blogPageId);
                   boolean displayBlog = 
blogContentPage.getActiveAndStagingEntryStates().size() > 0;
                   if (jData.gui().isNormalMode()) {
  

Reply via email to