You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Post <ba...@ifrance.com> on 2002/09/12 11:15:02 UTC

[2.1 bug ?] duplication of input fields/parameters

I upgraded to latest CVS yesterday, jdk 1.3.1, (East Coast noon) but this
did not solve the issue, do I have to submit to bugzilla ? :

Log doesn't really help since there are nested actions...

- I have a form validation  with simple form transformer. When the form is
correctly filled an emal is sent. I wrote a custom action to send this
email. Sitemap parameters passed to the action are filled from http request.

- Assuming form validation occurs once and succeds, scenario :
I fill the "to" field, hit "send" and the email is sent along with files
(the path of files is of hidden input fields).
I click "back" on the browser (IE5.5), so that I see the form again.
When I hit "send", duplicate files are attached. the "to" field is
duplicated too. (the form was cached by the browser).

- After sending email, I write the url to the sending email form in the
browser's address bar, same issue. EVEN WITH ANOTHER "serialNumber" request
parameter, so that Cocoon regenerates a full html page.

Sometimes I see duplicated fields in the html form, other times : when
forcing reload with Control + F5, the code is ok but the parameters are sent
duplicated.

Pipeline below. I need the simple form transformer though.

The xsl which generates the html form ("sendlickeyform.xsl") has a main
template, in which I define the empty input fields, or the http request
filled ones. So it is rather simple... I attach it anyway.

Maybe I am completely wrong ?

Barbara

   <!-- send license, req param : serialNumber -->
   <map:match pattern="sendlicense">
    <map:act type="request">
     <map:parameter name="parameters" value="true"/>
     <!-- authenticate as usual -->
     <map:act type="auth-protect">
      <map:parameter name="handler" value="baepp-handler"/>
      <!-- form has been submitted once so validate it -->
      <map:act type="request-exists">
       <map:parameter name="parameters" value="submittedOnce"/>
       <!-- form validation -->
       <map:act type="form-validator">
        <map:parameter name="descriptor" value="xml/sendlicense_desc.xml"/>
        <map:parameter name="validate-set" value="default"/>
        <!-- ok so send mail -->
        <map:act type="sendmail">
         <map:parameter name="smtpHost" value="10.41.20.3"/>
         <map:parameter name="subject" value="{../../../subject}"/>
         <!-- to be changeable (port) -->
         <map:parameter name="body"
value="http://localhost:9090/baepp/licensekeys/{../../../licensekey}/htmlbod
y.html"/>
         <map:parameter name="emailTo" value="{../../../emailTo}"/>
         <map:parameter name="emailCc" value="{../../../emailCc}"/>
         <map:parameter name="emailFrom" value="{../../../emailFrom}"/>
         <map:parameter name="nameFrom" value="{../../../nameFrom}"/>
         <map:parameter name="dataSources"
value="http://localhost:9090/baepp/images/links.gif;http://localhost:9090/ba
epp/images/leer.gif;http://localhost:9090/baepp/images/logo_www.gif"/>
         <map:parameter name="dsHeaders" value="abc@abc;abd@abc;abe@abc"/>
         <map:parameter name="file"
value="http://localhost:9090/baepp/licensekeys/{../../../licensekey}/{../../
../filename}.xml;http://localhost:9090/baepp/licensekeys/{../../../licenseke
y}/{../../../filename}lt.pdf"/>
         <map:parameter name="fileName"
value="{../../../filename}.xml;{../../../filename}lt.pdf"/>
         <map:redirect-to uri="menu"/>
        </map:act>
        <map:redirect-to uri="error?code=422303"/>
       </map:act>
       <!-- not ok : show input form -->
       <map:aggregate element="page">
        <map:part element="license"
src="xmldb:tamino://i3in0/tamino/BAEPP/BAEPP/#License_Info[@serialNumber='{.
./../serialNumber}']"/>
        <map:part element="mlform" src="cocoon://mlform"/>
        <map:part element="session" src="xml/getxml.xml"/>
       </map:aggregate>
       <map:transform type="session"/>
       <map:transform src="xsl/sendlickeyform.xsl">
        <map:parameter name="use-request-parameters" value="true"/>
        <map:parameter name="taminoUri"
value="http://i3in0/tamino/BAEPP/BAEPP"/>
       </map:transform>
       <map:transform type="simple-form"/>
       <map:serialize type="html"/>
      </map:act>
      <!-- no form validation ever occured, show input form -->
      <map:aggregate element="page">
       <map:part element="license"
src="xmldb:tamino://i3in0/tamino/BAEPP/BAEPP/#License_Info[@serialNumber='{.
./serialNumber}']"/>
       <map:part element="mlform" src="cocoon://mlform"/>
       <!-- write license on disk -->
       <map:part element="write"
src="cocoon://writelicense?serialNumber={../serialNumber}"/>
       <!-- write html body on disk -->
       <map:part element="htmlbody"
src="cocoon://writehtmlbody?serialNumber={../serialNumber}"/>
       <map:part element="session" src="xml/getxml.xml"/>
      </map:aggregate>
      <map:transform type="session"/>
      <map:transform src="xsl/sendlickeyform.xsl">
       <map:parameter name="taminoUri"
value="http://i3in0/tamino/BAEPP/BAEPP"/>
       <map:parameter name="use-request-parameters" value="true"/>
      </map:transform>
      <map:transform type="simple-form"/>
      <map:serialize type="html"/>
      <map:transform src="xsl/copy.xsl"/>
      <map:serialize type="xml"/>
     </map:act>
    </map:act>
   </map:match>


Re: [2.1 bug ?] duplication of input fields/parameters

Posted by Barbara Post <ba...@ifrance.com>.
Hi Antonio, this bug says that nested actions don't execute... In my case
the (nested) action that sends email buggy executes... ok it's known now.
Will add a short note to the bug report.

So let's hope someone has a clue soon... I absolutely cannot switch to 2.0.3
again because of several transformers I realized whe developping I had to
use (ok I can add some of them to the jar, but I guess
SourceWritingTransformer needs C 2.1, when one sees what it imports... no
?).

Thanks for both relieving and worrying me...

Barbara
----- Original Message -----
From: "Antonio Gallardo Rivera" <ag...@agsoftware.dnsalias.com>
To: <co...@xml.apache.org>
Sent: Thursday, September 12, 2002 11:58 AM
Subject: Re: [2.1 bug ?] duplication of input fields/parameters


> Log doesn't really help since there are nested actions...

Hi Barabara:

The bug in C2.1 lastest CVS is the nested actions!

I have the same problem, I cannot use the tutorial (about database
form-validation). This is a really hard problem.

I send you some responses about the same problem:

Gerhard wrote:

Check: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835

Please, confirm this bug, I hope someone will investigate this issue.
This bug is the reason I can't switch to 2.1 (and still use 2.0.3).

Also, Chris Haul wrote:

"Since this is not advocated officially, I respond off-list. 2.1 resources
have a feature / bug, so they will *return* to the calling statement
if no serializer is found.

With this you can use resources very similar to action-sets, although
you need to code the selector yourself.

Opinions differ whether this is a feature that will stay or a bug that
will be squashed, Since This discussion was end of spring, I hope it
will stay :-)

If it doesn't you'll have an easy migration back to working action-sets
by changing a few tag names and removing the selector."

But, I dont can find documentation about how to use <map:resources> :(

Antonio Gallardo

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [2.1 bug ?] duplication of input fields/parameters

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
> Log doesn't really help since there are nested actions...

Hi Barabara:

The bug in C2.1 lastest CVS is the nested actions!

I have the same problem, I cannot use the tutorial (about database 
form-validation). This is a really hard problem.

I send you some responses about the same problem:

Gerhard wrote:

Check: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835

Please, confirm this bug, I hope someone will investigate this issue. 
This bug is the reason I can't switch to 2.1 (and still use 2.0.3).

Also, Chris Haul wrote:

"Since this is not advocated officially, I respond off-list. 2.1 resources
have a feature / bug, so they will *return* to the calling statement
if no serializer is found.

With this you can use resources very similar to action-sets, although
you need to code the selector yourself.

Opinions differ whether this is a feature that will stay or a bug that
will be squashed, Since This discussion was end of spring, I hope it 
will stay :-)

If it doesn't you'll have an easy migration back to working action-sets
by changing a few tag names and removing the selector."

But, I dont can find documentation about how to use <map:resources> :(

Antonio Gallardo

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>