Working with Cocoon 2.1.8
 
I am trying to pass data from flowscript to a from, but
with no success.  The value of "foo" in the scenario below
simply does not show up (although normal widgets, which I
have stripped out in the sample below, show up fine).  
 
What do I need to change?
 
Thanks
Derek
 
 
 
The flowscript looks like:
 
   var tForm = new Form("cocoon:/db/update/form/test", {"foo":"foob"});
    var tmodel = tForm.getModel(); 
    tForm.showForm("db/test.uforms");
 
The sitemap has:
 
     <map:match pattern="db/update/form/*">
       <map:generate src="update/{1}_defn.xml" type="jx">
         <use-request-parameters>true</use-request-parameters>
      </map:generate>
       <map:transform src="stylesheets/forms/strip-page.xsl" >
       <map:serialize type="xml" />
     </map:match>         
     
     <map:match pattern="db/*.uforms">
       <map:generate src="update/{1}_template.xml" type="jx"></map:generate>    
  
       <map:transform type="forms" >
       <map:transform type="i18n"/>
       <map:transform src="stylesheets/doc/cforms.xsl"/>
       <map:serialize type="html"/>
     </map:match> 
 
And the simple form (test_defn.xml) looks like:
 
<fd:form
 xmlns:fd="http://apache.org/cocoon/forms/1.0#definition";
 xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
 xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>
 
 <fd:widgets>
 
  <fd:field id="message" required="false">
   <fd:label></fd:label>
   <fd:initial-value>* ${foo} *</fd:initial-value>
   <fd:datatype base="string">
   </fd:datatype>
  </fd:field>

    <fd:submit id="ok" action-command="ok" validate="true">
        <fd:label> OK </fd:label>
    </fd:submit>  
    <fd:submit id="cancel" action-command="cancel" validate="false">
        <fd:label>Cancel</fd:label>
    </fd:submit>      
 
 </fd:widgets>
</fd:form>
 

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

Reply via email to