cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <pguill...@citycita.net>
Subject Re: "Reset" cachingURI coplet
Date Thu, 26 May 2005 09:59:20 GMT
Thanks Jean-Baptiste,

Looks really good. Unfortunately it does the same for me, no errors and 
the succes page is still displayed!
It seems  i do  not cache the response, the coplet temporaryURI is still 
with the continuation, so the response is regenerated because flowscript 
starts again at the continuation point. 
(cocoon://portal/coplets/mycoplet/xxxxxxxxxxx.continue)
I suppose you added something else, but can't get what!?

Regards,

Phil

Jean-Baptiste Quenot wrote:

>* Philippe Guillard:
>
>  
>
>>I'm  looking  for some  idea/solution  to  refresh a  cachingURI
>>coplet content after a form in portal has been submitted. Then a
>>user  going to  other  tabs and  going back  would  not see  the
>>"success" page again.
>>    
>>
>
>Here is what we do:
>
>showForm()
>doNotCacheCopletResponse(copletId);
>cocoon.sendPage("success-page");
>
>And here is the magic function:
>
>function doNotCacheCopletResponse(copletId)
>{
>  cocoon.log.debug("doNotCacheCopletResponse:  coplet="+copletId);
>
>  var service = cocoon.getComponent(org.apache.cocoon.portal.PortalService.ROLE);
>  var profileManager = service.getComponentManager().getProfileManager();
>  var coplet = profileManager.getCopletInstanceData(copletId);
>  // tells the coplet not to cache the his content
>  // Note : this code comes from CachingURICopletAdapter
>  coplet.setAttribute(org.apache.cocoon.portal.coplet.adapter.impl.CachingURICopletAdapter.DO_NOT_CACHE,
"true");
>}
>
>This prevents caching for the success page.
>
>HTH,
>  
>


Mime
View raw message