portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers MultiColumnControllerAction.java
Date Tue, 30 Jul 2002 17:31:42 GMT
paulsp      2002/07/30 10:31:41

  Modified:    docs/site changes.html
               xdocs    changes.xml
               src/java/org/apache/jetspeed/modules/actions/controllers
                        MultiColumnControllerAction.java
  Log:
  o Fix Bug #6426 - Entries in deleted columns are now placed at then of the
    portlets list during customization.
  o Only call dumpColumns() when debug logging enabled (Performance improvement)
  o Basic cleanup per checkStyle
  PR:6426
  
  Revision  Changes    Path
  1.36      +4 -0      jakarta-jetspeed/docs/site/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- changes.html	26 Jul 2002 01:51:46 -0000	1.35
  +++ changes.html	30 Jul 2002 17:31:41 -0000	1.36
  @@ -130,6 +130,10 @@
   -->
         </ul>
                                                   <li>
  +  Fix - 2002/07/30 - Bug #6426 - Entries in deleted columns are now placed at 
  +                     then of the portlets list during customization. (PS)
  +</li>
  +                                                <li>
     Fix - 2002/07/25 - Title/Description/Image in PortletInstance now uses PSML MetaInfo
(PS)
   </li>
                                                   <li>
  
  
  
  1.56      +5 -1      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- changes.xml	26 Jul 2002 01:51:46 -0000	1.55
  +++ changes.xml	30 Jul 2002 17:31:41 -0000	1.56
  @@ -24,6 +24,10 @@
   -->
         </ul>
   <li>
  +  Fix - 2002/07/30 - Bug #6426 - Entries in deleted columns are now placed at 
  +                     then of the portlets list during customization. (PS)
  +</li>
  +<li>
     Fix - 2002/07/25 - Title/Description/Image in PortletInstance now uses PSML MetaInfo
(PS)
   </li>
   <li>
  
  
  
  1.14      +24 -9     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
  
  Index: MultiColumnControllerAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MultiColumnControllerAction.java	23 Jul 2002 00:03:54 -0000	1.13
  +++ MultiColumnControllerAction.java	30 Jul 2002 17:31:41 -0000	1.14
  @@ -195,7 +195,8 @@
   
               if ( (constraints != null)
                    && (constraints.getColumn() != null)
  -                 && (constraints.getRow() != null) )
  +                 && (constraints.getRow() != null) 
  +                 && (constraints.getColumn().intValue() < colNum) )
               {
                   row = constraints.getRow().intValue();
                   col = constraints.getColumn().intValue();
  @@ -235,7 +236,11 @@
               }
           }
   
  -        dumpColumns(table);
  +        if (Log.getLogger().isDebugEnabled())
  +        {
  +            dumpColumns(table);
  +        }
  +        
           context.put("portlets", table);
           }
           catch (Exception e)
  @@ -669,12 +674,22 @@
               }
   
               Log.debug("Constraints col "+col+" row "+row);
  -            if ( (row >= 0) && (col >= 0) )
  +            if ( (row >= 0) && (col >= 0) && (col < colNum))
               {
                   table[col].set(row,entry);
               }
               else
               {
  +                if (layout != null)
  +                {
  +                    // We got here because the column, as defined in the layout,
  +                    // is greater then the numner of columns. This usually 
  +                    // happens when the number of column has been decreased.
  +                    // Delete the offending layout.  It may be recreated with
  +                    // the correct values.
  +                    entry.setLayout(null);
  +                    layout = null;
  +                }
                   work.add(entry);
               }
           }
  @@ -739,9 +754,9 @@
       {
           List list = new Vector();
   
  -        if (classlist!=null)
  +        if (classlist != null)
           {
  -            StringTokenizer st = new StringTokenizer(classlist,",");
  +            StringTokenizer st = new StringTokenizer(classlist, ",");
               while (st.hasMoreTokens())
               {
                   list.add(st.nextToken());
  @@ -753,12 +768,12 @@
   
       protected void dumpColumns(List[] cols)
       {
  -        for(int i=0;i<cols.length;i++)
  +        for (int i = 0; i < cols.length; i++)
           {
  -            Log.debug("Column "+i);
  -            for(int j=0; j < cols[i].size(); j++)
  +            Log.debug("Column " + i);
  +            for (int j = 0; j < cols[i].size(); j++)
               {
  -                Log.debug("Row "+j+" object: "+cols[i].get(j));
  +                Log.debug("Row " + j + " object: " + cols[i].get(j));
               }
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message