cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayana Joseph <ayana_josep...@yahoo.co.uk>
Subject DESPERATELY NEED HELP!!!!!!!
Date Wed, 20 Oct 2004 11:14:53 GMT
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.datasource.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");
}

		
---------------------------------
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
Mime
View raw message