cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl SizingAspect.java
Date Wed, 10 Mar 2004 12:28:29 GMT
cziegeler    2004/03/10 04:28:29

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl
                        DefaultAspectDataHandler.java
               src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
                        SizingAspect.java
  Log:
  Fix sizing bug and minor performance improvement
  
  Revision  Changes    Path
  1.7       +11 -4     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java
  
  Index: DefaultAspectDataHandler.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultAspectDataHandler.java	5 Mar 2004 13:02:10 -0000	1.6
  +++ DefaultAspectDataHandler.java	10 Mar 2004 12:28:29 -0000	1.7
  @@ -83,7 +83,7 @@
        * @see org.apache.cocoon.portal.aspect.AspectDataHandler#getAspectDatas(org.apache.cocoon.portal.aspect.Aspectalizable)
        */
       public Map getAspectDatas(Aspectalizable owner)  {
  -        Map datas = new AspectDatasHashMap(owner, this);
  +        AspectDatasHashMap datas = new AspectDatasHashMap(owner, this);
           Iterator iter = this.description.getAspectDescriptions().iterator();
           while ( iter.hasNext() ) {
               AspectDescription current = (AspectDescription)iter.next();
  @@ -92,6 +92,7 @@
                   datas.put( current.getName(), data );
               }
           }
  +        datas.initialize();
           return datas;
       }
   
  @@ -166,6 +167,7 @@
       
       protected AspectDataHandler handler;
       protected Aspectalizable owner;
  +    protected boolean init = false;
       
       public AspectDatasHashMap(Aspectalizable owner, AspectDataHandler handler) {
           this.handler = handler;
  @@ -176,9 +178,14 @@
        * @see java.util.Map#put(java.lang.Object, java.lang.Object)
        */
       public Object put(Object key, Object value) {
  -        this.handler.setAspectData(this.owner, key.toString(), value);
  -        value = this.handler.getAspectData(this.owner, key.toString());
  +        if ( this.init ) {
  +            this.handler.setAspectData(this.owner, key.toString(), value);
  +            value = this.handler.getAspectData(this.owner, key.toString());
  +        }
           return super.put(key, value);
       }
   
  +    public void initialize() {
  +        this.init = true;
  +    }
   }
  
  
  
  1.8       +2 -2      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/SizingAspect.java
  
  Index: SizingAspect.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/SizingAspect.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SizingAspect.java	5 Mar 2004 13:02:13 -0000	1.7
  +++ SizingAspect.java	10 Mar 2004 12:28:29 -0000	1.8
  @@ -72,7 +72,7 @@
                   XMLUtils.createElement(handler, "maximize-uri", service.getComponentManager().getLinkService().getLinkURI(event));
               }
               
  -            if (size == SizingStatus.STATUS_MINIMIZED) {
  +            if (size.equals(SizingStatus.STATUS_MINIMIZED)) {
                   showContent = false;
               }
           } 
  
  
  

Mime
View raw message