Try to simplify:

- add print("some info on your variables") debug statements to your
flowscript to figure out what's going on.
- simplify the form to one or two string fields just to see if there is
invalid stuff in your form definition.
- copy a working sample to your project and tweak it until it either does
what you want it to do or until it fails in the same way.

HTH

Bye, Helma

> -----Original Message-----
> From: ayana joseph [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 20 October, 2004 13:34
> To: [EMAIL PROTECTED]
> Subject: HELP WITH FORM DISPLAY
> 
> 
> 
> Hi, I am a Masters student from the University of the West Indies in 
> Trinidad and I am using cocoon 2.1.3 for my thesis project to 
> design some 
> forms using woody and flowscript.
> 
> When I call the pipeline to display a particular form, I get the 
> confirmation page or the success page instead of the form 
> being displayed. 
> Can anyone tell me what I am doing wrong? Here is a sample of 
> the code 
> below:
> 
> The SITEMAP :
> 
> <map:pipeline>
>   <map:match pattern="playerRegistration">
>         <map:call function="playerRegistration"/>
>        </map:match>
> 
> <map:match pattern="*.continue">
>        <map:call continuation="{1}"/>
>      </map:match>
> 
>      <map:match pattern="player-registration-display-pipeline">
>        <map:generate src="forms/player_registration_template.xml"/>
>        <map:transform type="woody"/>
>        <map:transform type="i18n">
>          <map:parameter name="locale" value="en-US"/>
>        </map:transform>
>        <map:transform 
> src="context://samples/common/style/xsl/html/simple-page2html.xsl">
>          <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>          <map:parameter name="servletPath" 
> value="{request:servletPath}"/>
>          <map:parameter name="sitemapURI" 
> value="{request:sitemapURI}"/>
>          <map:parameter name="file" 
> value="forms/player_registration_template.xml"/>
>          <map:parameter name="remove" value="{0}"/>
>        </map:transform>
>        <map:transform src="resources/woody-samples-styling.xsl"/>
>          <map:serialize/>
>        </map:match>
> 
>       <map:match pattern="player-registration-success-pipeline">
>        <map:generate type="jx" 
> src="forms/player_registration_success.jx"/>
>        <map:transform 
> src="context://samples/common/style/xsl/html/simple-page2html.xsl">
>          <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>          <map:parameter name="servletPath" 
> value="{request:servletPath}"/>
>          <map:parameter name="sitemapURI" 
> value="{request:sitemapURI}"/>
>          <map:parameter name="file" 
> value="forms/player_registration_success.jx"/>
>      <map:parameter name="remove" value="{0}"/>
>        </map:transform>
>        <map:serialize/>
>      </map:match>
>    </map:pipeline>
> 
> The FLOWSCRIPT:
> 
> function playerRegistration()
> {
>    form = new Form("forms/playerRegistration.xml");
> 
>   try
>    {
> 
>   ///////connecting to DB///////
> 
>   dbSelector = 
> cocoon.getComponent(Packages.org.apache.avalon.excalibur.datas
> ource.DataSourceComponent.ROLE 
>   + "Selector");
>        var dataSrc = dbSelector.select("mysql-pool");
>        conn = dataSrc.getConnection();
> 
>    ///////connecting to DB///////
> 
>   //////executing query//////
> 
>   var query = "select name from team ;";
>   var stmt = conn.createStatement();
>   stmt.execute(query);
>   var rs = stmt.getResultSet();
> 
> //////executing query//////
> 
>   var list1 = buildSelectionList(rs);// puts result from 
> database into an 
> array
> var tList = form.getWidget("team");
>   tList.setSelectionList(list1,"key","value");
>   form.showForm("player-registration-display-pipeline");
> }catch(e){e.toString();} 
> cocoon.sendPage("player-registration-success-pipeline");
> }
> 
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now! 
> http://toolbar.msn.com/
> 
> 
> ---------------------------------------------------------------------
> 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