cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: CachingURICoplet and Flowscript / CForms
Date Fri, 26 Mar 2004 09:23:31 GMT
Jon Evans wrote: 
> 
> Hi Carsten,
> 
> On 25 Mar 2004, at 08:43, Carsten Ziegeler wrote:
> 
> > If the cache entry for a coplet is valid or not is stored as an  
> > attribute on the coplet. If you set the attribute "cacheValidity"
> > to "0", the cache becomes invalid.
> >  So, all you have to do is:
> >  function reset() {
> >      this.coplet.setAttribute("cacheValidity", "0");  }  
> and hopefully 
> > this should work :)
> 
> You tease me with pseudo-code! :-)  How do I get the coplet 
> reference in my flowscript?
> 
Yeah :) The rest is left to the reader...

This requires a little bit of code, have a look at the
AbstractCopletTransformer,
there you'll find the getCopletInstanceData(String) method. If you pass in
null as the id into this method, you get the current coplet instance data 
(= this.coplet). So you simply have to copy that code to your flow script.


> this.coplet just returns null. :-(
> 
HTH
Carsten


Mime
View raw message