It's true, your solution works correctly, but in my opinion is not an approach generalized to the use of cocoon forms inside a web page composed by various and variables parts (fragments). As an example, if you want to reuse the same pipeline and the same flowscript function to manage your form inside different pages (or inside different compositions of fragments), it's not the better approach.
For Example: a page with a form to search data in database and with the results organized in different fragments (the choice of the number and type of fragments is based on the value of some parameters in the form).
For Example: the same form in several pages aggregated in completely different way.
 
In a previous mail Mark Lundquist wrote:
"When the user submits the form, if it doesn't validate then showForm() will call cocoon.sendPageAndWait() again.  That invokes your display pipeline (the one with the WoodyTemplateTransformer), but this invocation of the pipeline is no longer upstream of your aggregating pipeline, its "standalone"... so, the external request will be answered with the output of the display pipeline, not the aggregating pipeline.
In other words, you'll get just the form, not the whole page."
 
I'd like to find a generic solution to the problem, do you agree? The main principle is "Reuse".
 
Thanks
 
 -----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Inviato: marted́ 20 aprile 2004 9.45
A: [EMAIL PROTECTED]
Oggetto: Re: woody and content aggregation


Hi,

I also do the same and it works correctly :

Here is my aggregate page ( = a called resource)
==================================
<!-- generate a page by merging all parts making up a page -->
    <map:resource name="show-simple-form">
      <map:act type="locale">
        <map:aggregate element="PAGE" label="aftergenerator">
          <map:part src="">"cocoon://internal-portal/top" element="TOP"
          strip-root="true" />
          <map:part src="">"cocoon://internal-portal/left"
          element="LEFT" strip-root="false" />
          <map:part src="">"{../page}" element="BODY"
          strip-root="false" />
          <map:part src="">"cocoon://internal-portal/bottom"
          element="BOTTOM" strip-root="false" />
        </map:aggregate>
             
        <map:transform src="">"{../style}" label="afterstyle" />
         
          <map:transform type="translator"  label="afteri18n , search, print" >
                   <map:parameter name="locale" value="{locale}" />
        </map:transform>
<!-- PAY ATTENTION -->
<!-- This transformer is required to remove the comment tag at the end of the pipeline -->
<!-- We have to do that because, we import some Notes Content in the XML Stream as a comment -->
<!-- and if we remove the comment to fast , we will lost the info -->
<!-- So, at the end of all the pipelines, we remove the comment tag -->
        <map:transform
        src="">"context://stylesheets/system/mpe_clean_comment.xsl"
        label="content"></map:transform>
     
        <map:serialize label="links, content" />
   
<!--  For Debug -->
<!--      
                <map:serialize type="xml"/>
     -->
      </map:act>
    </map:resource>
=============================

An here is the woody call :

================================
<!--  Call Tellus Flow  -->
      <map:match pattern="new">
        <map:call function="newTellUs" />            <-- Call the flowscript
      </map:match>      
     
      <!-- First Call to Tell us is the Tell us creation -->
      <map:match pattern="new-display-pipeline">
                <map:call resource="show-simple-form">
                    <map:parameter name="page" value="cocoon:/display-form/name=entry"/>     <!-- call an internal pipe to generate woody (see later)
                    <map:parameter name="style" value="context://stylesheets/mpe_tellus.xsl"/>
                </map:call>                
      </map:match>
     
       <!-- After the submit -->
      <map:match pattern="new-success-pipeline">
              <map:call resource="show-simple-form">
                        <map:parameter name="page" value="cocoon://internal-portal/tellus/success"/>
                        <map:parameter name="style" value="context://stylesheets/mpe_simple.xsl"/>
                </map:call>        
      </map:match>
=========================
Some internal pipe :

========================
  <map:pipeline internal->"true" type="caching-point">

        <!-- Retrieve and Generate the Form  -->
      <map:match pattern="display-form/name=*">
        <map:act type="locale">
       <map:generate    src="">"context://woody/tellus/forms/entry_template.xml"  />
       <map:transform type="woody" label="afterwoody" />
       <!-- REALLY IMPORTANT : You have to translate the woody field, validation HERE else this is lost -->
       <map:transform type="translator"  label="afteri18n , search, print" >
                   <map:parameter name="locale" value="{locale}" />
        </map:transform>
       <map:transform  src="">"context://stylesheets/woody-main-styling.xsl"  />
     
        <map:serialize />
     </map:act>
      </map:match>


Here it is

Hope it could help

Laurent



"Jan Hoskens" <[EMAIL PROTECTED]>

20/04/2004 08:11
Please respond to users

       
        To:        <[EMAIL PROTECTED]>
        cc:        
        Subject:        Re: woody and content aggregation



I'm not sure what you're meaning here, please give some more information (sitemap pieces, aggregation pipeline/display pipeline). Why do you refer to multiple forms on one page? Are you just meaning that you're aggregating a page and the display pipeline does not go through that aggregation?
 
(I'm not sure that I can help you, but anyway, more info is needed if someone other reads your mail)
 
Kind Regards,
Jan
----- Original Message -----
From: Trevisani Andrea
To: 'cocoon_users'
Sent: Monday, April 19, 2004 5:15 PM
Subject: woody and content aggregation

I need a great help!!!!!!

I have a composite web page, combined with map:aggregate. I have a great problem with a woody form: when Woody validates the form and the the result is KO the flowscript invokes my display pipeline but I can't display all the composite page, I get only the form!!!!

I know that a solution exist for this problem (multiple forms on a single page), please help me with an example ...

Thanks (excuse me for my english ...)

Andrea Trevisani
Wind Telecomunicazioni S.p.A. - Direzione e Coordinamento di Enel S.p.A.

Via Brunacci 36 - 30175 Marghera (VE)

Progettazione RF - Nord Est

Cell.      +39
328 7100204
Tel. Uff.  +39
41 8293981
Fax        +39 06 83175298

Fax2       +39 41 8293347

e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
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