cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <elad.mess...@eml-d.villa-bosch.de>
Subject AW: Cocoon.sendpage data object in another flowscript
Date Fri, 27 May 2005 14:32:31 GMT
Some clarifications :
My Flowscript :
 
function handleFormRestaurantMainSearch() {
    var form = new Form("forms/restaurant_main_search.xml");
    
    form.showForm("/template/forms/restaurant_main_search.xhtml");
 
    var model = form.getModel();
    cocoon.sendPage("/RestaurantMainResults/", { "query": model });
   
}
 
function callRestaurantMainResults() {
 var query = cocoon.context.query;
  here - query is empty ..
 }
 
My pipeline:
        <map:match pattern="**RestaurantMainResults**">
          <map:call function="callRestaurantMainResults"/>
        </map:match>
 
As I said - my problem is that cocoon.contect.query is empty, while I
was expected to get the Form results.
 
I hope this is clearer now...
 
Thanks again
 
Elad

  _____  

Von: Messing, Elad 
Gesendet: Freitag, 27. Mai 2005 11:59
An: users@cocoon.apache.org
Betreff: Cocoon.sendpage data object in another flowscript



Hello all

        I think I am missing something here:

        I have a cocoon form. The last line of the form send the results
to a pipeline - cocoon.sendPage("name", data);

        No the pipeline name actually calls another flowscript function.

        function name() {

                var data = cocoon.context.data;

                [some analyzing of data]

        No - the problem is that "cocoon.context.data" is empty ! I do
not get the "data" from the form. 

        It is said in the docs that :

        " 

        Function sendPage([String] uri, [Object] bean)  

                bean is a context object which can be accessed inside
this page to extract various values and place them in the generated
page.

        "

        So what am I doing wrong ?

        Thank you !

Elad Messing


Mime
View raw message