Thank you Reinhard, for you answer !
I understand, so this is typical "Back" behavior. It makes sense.

However - Still the 3rd issue I mentioned occurs:  
"
 And the third issue - When I am not using the "Back" button, 
 but instead using the original "link" to the form page, I get other 
 results:
 - I can see the form in the state it was after I entered a "too-short" 
 string in the text field !! This is after I have already changed the 
 data to valid, submitted, got my results, and return to the form page 
 using its link 1 minute after.. I even get the results opening a new 
 browser window, in a different process. Only "restart" to the web 
 server removes it. 
"

Is this cache as well ? This time - server cache ? Or maybe something else ? 
How can I check it ?

Thank you again !!

Elad





-----Ursprüngliche Nachricht-----
Von: Reinhard Poetz [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 8. Juni 2005 08:54
An: users@cocoon.apache.org
Betreff: Re: AW: AW: WG: CFORMS validation unexplained behavior - call for help!

Messing, Elad wrote:
> Sorry - my mistake. Here goes :
> 
> *********************************************
> URL "XXX.form" -> resolves in sitemap to :
> 
>         <map:match pattern="*.form">
>           <!-- CForm (makred by the .form ending) redirected to a flow script 
> function with the same name -->
>           <map:call function="handleForm{1}"/>
>         </map:match>
> 
> *********************************************
> Flowscript :
> 
> function handleFormXXX() {
>     var data = {restTypeList: getRestTypes()};
> 
>     var form = new Form("forms/xxx_main_search.xml");
>     
>     form.showForm("/template/forms/xxx_main_search.xhtml", data);
> 
>     var model = form.getModel();
>    
>     var results = new Object();
>     results.model = getModelSearchResults(model.name, model.type);
>     cocoon.sendPage("/template/dynamic/xxx_results.jx", { "results": 
> results });
>    
> }
> *********************************************
> template/forms/xxx_main_search.xhtml in the sitemap again :
> 
>         <map:match pattern="forms/**">
>           <!-- This will handle CForms. It is called after a flowscript, and 
> delegate to a xhtml file, with <ft:form-template tag to hold the form. Then 
> it applies the form styling-->
>           <map:generate src="content/{1}"/>
>           <map:transform type="forms"/>
>           <map:transform src="stylesheets/system/forms-samples-styling.xsl"/>
>           <map:serialize type="xhtml"/>
>         </map:match>
> *********************************************
> 
> Hope this is all the info you need. If something is missing - let me know and 
> I will add it quickly.
> 
> Thank you again for your patience!


Your flowscript looks good to me. Also the behaviour that hitting the 
back-button leads to a page showing the errors and the correct values is caused 
by the nature of web browsers as the page before was showing the errors. Have a 
look at the logs and you'll see that there hasn't been any server request. You 
can watch the same effect at samples/blocks/forms/form1.flow.

If you want to change this I'd look at response headers related to caching and 
maybe you should have a look at 
http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost. Note, 
AFAIK this hasn't been implemented with Flowscript yet, but it should be 
feasible.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to