cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Dombrowski <qdomb...@uiuc.edu>
Subject Re: Parameters- from CForms into sitemap
Date Sun, 12 Apr 2009 13:57:48 GMT
Thanks for the help, Andre!

*Something* is going through, because I'm getting a blank instead of the 
default parameter I set in the XSL, but I'm still not able to pick up 
the value. I've tried both flow-attr and flow-attribute.

The relevant pieces I've got here are:

Flowscript - registration.js contains:
    var viewData = { "username" : form.getChild("name").getValue() }
    cocoon.sendPage("registration-success-pipeline", viewData);

Sitemap contains:
      <map:match pattern="registration-success-pipeline">
        <map:generate src="myxml.xml" type="file"/>
        <map:transform src="myxsl.xsl" type="xslt2">
          <map:parameter name="username" 
value="{flow-attribute:username}"/>
        </map:transform>
        <map:serialize type="html"/>
      </map:match>

XSL contains:
<xsl:param name="username" select="'default'"/>

Is there something I'm missing or have wrong?

Thanks again!

~Quinn


André Davignon wrote:
> Hi,
>
> The "flow-attr" input module could maybe help you :
>
> <map:parameter name="username" value="{flow-attr:username}"/>
>
> or something like that...
>
> André
>
>
>> Hello,
>>
>> This is my first time working with the Forms block in Cocoon 2.2 and 
>> I've gotten a bit stuck. I got the Simple Example to work 
>> (http://cocoon.apache.org/2.2/blocks/forms/1.0/478_1_1.html) but I'm 
>> trying to modify it to pass the {username} value as a parameter for a 
>> different stylesheet.
>>
>> I've redirected the registration-success pipeline as:
>>
>>      <map:match pattern="registration-success-pipeline">
>>        <map:generate src="myxml.xml" type="file"/>
>>        <map:transform src="mystylesheet.xsl" type="xslt2"/>
>>        <map:serialize type="html"/>
>>      </map:match>
>>
>> But there's nothing I can do to get the {username} value to show up. 
>> Even when I try something like:
>>                <map:transform src="mystylesheet.xsl" type="xslt2">
>>                    <map:parameter name="username" value="{username}"/>
>>                </map:transform>
>> the value doesn't go through. Any suggestions?
>>
>> Thanks!
>>
>> ~Quinn
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


Mime
View raw message