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 Wed, 07 Nov 2001 04:03:36 GMT
paulsp      01/11/06 20:03:36

  Modified:    src/java/org/apache/jetspeed/modules/actions/controllers
                        MultiColumnControllerAction.java
  Log:
  Add parameter col_classes to allow each column to have a different class.  As an example
  the first column can be bordered and the second can be un-bordered
  
  Revision  Changes    Path
  1.5       +25 -0     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MultiColumnControllerAction.java	2001/07/29 13:41:52	1.4
  +++ MultiColumnControllerAction.java	2001/11/07 04:03:36	1.5
  @@ -92,6 +92,7 @@
    * grid positioned layout using PortletSet.Constraints
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  + * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
    */
   public class MultiColumnControllerAction extends VelocityControllerAction
   {
  @@ -125,6 +126,10 @@
           String sizes = controller.getConfig().getInitParameter("sizes");
           context.put("sizes", getCellSizes(sizes));
   
  +        //retrieve the class for each of the columns
  +        String columnClasses = controller.getConfig().getInitParameter("col_classes");
  +        context.put("col_classes", getCellClasses(columnClasses));
  +
           PortletSet set = controller.getPortlets();
           // normalize the constraints and calculate max num of rows needed
           Enumeration en = set.getPortlets();
  @@ -264,6 +269,10 @@
           String sizes = controller.getConfig().getInitParameter("sizes");
           context.put("sizes", getCellSizes(sizes));
   
  +        //retrieve the class for each of the columns
  +        String columnClasses = controller.getConfig().getInitParameter("col_classes");
  +        context.put("col_classes", getCellClasses(columnClasses));
  +
           columns = (List[])rundata.getUser().getTemp("columns");
           PortletSet customizedSet = (PortletSet)jdata.getCustomized();
           Portlets set = jdata.getProfile()
  @@ -680,6 +689,22 @@
           if (sizelist!=null)
           {
               StringTokenizer st = new StringTokenizer(sizelist,",");
  +            while (st.hasMoreTokens())
  +            {
  +                list.add(st.nextToken());
  +            }
  +        }
  +        
  +        return list;
  +    }
  +    
  +    protected static List getCellClasses(String classlist)
  +    {
  +        List list = new Vector();
  +        
  +        if (classlist!=null)
  +        {
  +            StringTokenizer st = new StringTokenizer(classlist,",");
               while (st.hasMoreTokens())
               {
                   list.add(st.nextToken());
  
  
  

--
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