cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Kermagoret <...@babelobjects.com>
Subject Re: CachingURICoplet and Flowscript / CForms
Date Wed, 24 Mar 2004 18:52:11 GMT
Hello,
you could use the boomark feature to set an attribute (screen for 
example) to a value that displays the screen you want (success for example).

That way, when you come back from another tab, your portal displays the 
right screen bases on the attribute value you set.

So in your success pipeline you just need to redirect the user to 
..bookmark?screen=success
where screen is an attribute value of your coplet.

HTH

Alex Romayev wrote:

>Jon,
>
>I do remember your first post on this and I think you
>are phrasing it very clear now.  Having said this, I
>don't know if anyone here really has the answer, given
>that the CachingURICoplet is fairly new.  I would like
>to know the answer as well, as I can see myself having
>to solve the same problem shortly.
>
>It is highly possible that no one except for Carsten
>really has the answer.  Have you tried posting on the
>dev list, as he is more likely to take a notice of it
>there.
>
>Sorry I couldn't help.
>
>-Alex
>
>
>--- Jon Evans <jon.evans@misgl.com> wrote:
>  
>
>>Hi everyone,
>>
>>I'm still having problems implementing a
>>cforms-based coplet in 
>>flowscript, and I think maybe in previous messages
>>to this list I've 
>>not been very clear as to what my problem is, so I'm
>>going to try 
>>again. :-)
>>
>>Lets say I have a form that lets the user update
>>their details.  
>>Pseudo-flow-code would be:
>>
>>function show(form) {
>>   populate(form);
>>   form.showForm("display-pipeline");
>>   saveToDB(form);
>>
>>   cocoon.sendPage("success-pipeline");
>>}
>>
>>So the coplet starts off by displaying an "update
>>your details" form, 
>>then when you click submit it says "updates saved"
>>or something.
>>
>>In order for it to work properly with the portal
>>engine, it is a 
>>CachingURICoplet.  This means that if you switch
>>away to a different 
>>tab in the site, then back again, the coplet will
>>load from the cache.  
>>This is normally what you want, except after you've
>>displayed the final 
>>page ("Your updates have been saved to the
>>database") you actually want 
>>it to reset itself, so that the next time the portal
>>needs to render 
>>the coplet it regenerates itself from scratch. 
>>Otherwise you update 
>>your details once, and after that you always get the
>>"success" page.
>>
>>I can fudge it by changing the flowscript to a
>>while(true){} loop, and 
>>rendering the success page with sendPageAndWait, and
>>putting a "Make 
>>another change" button on the success page.  But
>>that user interface 
>>needs taking out and shooting. :-)  What I want to
>>be able to do is:
>>
>>function show(form) {
>>   populate(form);
>>   form.showForm("display-pipeline");
>>   saveToDB(form);
>>
>>   cocoon.sendPage("success-pipeline");
>>   reset();
>>}
>>
>>function reset() {
>>   // this is pseudo code remember!
>>   thisCoplet.reset();
>>   thisCoplet.clearCache();
>>   // Now the next time this coplet is displayed,
>>   // it will be generated from scratch as if it
>>   // had never been displayed before
>>}
>>
>>
>>Also, I'm still looking for a code snippet that
>>would let me do this 
>>from my flowscript:
>>
>>var myValue = thisCoplet.get("attributes/myValue");
>>// where myValue is defined in my
>>copletdata/portal.xml file
>>
>>Thanks,
>>
>>Jon
>>
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail:
>>users-help@cocoon.apache.org
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


-- 

Jean-Christophe Kermagoret
jck@BabelObjects.Com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message