cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smailingl...@gmx.net
Subject cocoon 2.1.8 portal FW how to use request params
Date Sun, 07 May 2006 14:04:47 GMT
i´ve definied 2 coplets in copletdata/portal.xml

  <coplet-data id="Login2" name="standard">
    <title>Login</title>
    <coplet-base-data>URICoplet</coplet-base-data>
    <attribute>
      <name>uri</name>
      <value
xsi:type="java:java.lang.String">cocoon:/coplets/login2/coplet</value>
    </attribute>
  </coplet-data>

and 

  <coplet-data id="LoginResult" name="standard">
    <title>Login</title>
    <coplet-base-data>URICoplet</coplet-base-data>
    <attribute>
      <name>uri</name>
      <value
xsi:type="java:java.lang.String">cocoon:/coplets/login2/result</value>
    </attribute>
  </coplet-data>

they are ordered in composite-layout.

--

the pipeline in the sitemap.xml is quite simple
  <map:pipeline>	

    <map:match pattern="coplet">
        <map:generate src="login.xml"/>
        <map:transform src="login-html.xsl"/>
	      <map:serialize type="xml"/>
    </map:match>
 
    <map:match pattern="result">
        <map:generate src="result.xml"/>
        <map:transform src="result-html.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
          <map:parameter name="name" value="{request-param:name}"/>
          <map:parameter name="password" value="{request-param:password}"/>
        </map:transform>
        <map:serialize type="xml"/>
    </map:match>
  </map:pipeline>

--

the XSLT for the login itself contains the following (its just a modified
version of the login-html.xsl)

...
<xsl:template match="form">
	<form method="post" target="_top" action="result">
		<table>
	        <xsl:apply-templates select="field"/><br/>
		</table>
		<input type="submit" value="Login"></input>
	</form>
...

---

the result-html.xsl contains

...
<xsl:param name="name"/>
<xsl:param name="password"/>
<xsl:template match="content">
  <br/>name: <xsl:value-of select="$name"/>
  <br/>pass: <xsl:value-of select="$password"/>
</xsl:template>
...


params are send through the form and the portal page is rendered correct but
the params in the result-html.xsl are empty.

any hints what i´m doing wrong ? i´dont wont to use FlowScript or XSP
because i think it should be working this way.



-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message