[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-dev
Subject:    AW: [C2]: Problems with Actions and Parameters
From:       "Carsten Ziegeler" <cziegeler () sundn ! de>
Date:       2001-02-28 15:55:50
[Download RAW message or body]

> Berin Loritsch wrote:
> 
> Ok.  I got it fixed, and applied it to the sitemap in the distro.
> It even makes the action-set reusable in many places.  This is
> awesome stuff.
> 
Great, it works again. Thanks Berin

Carsten
> >
> > Carsten Ziegeler wrote:
> > >
> > > Hi,
> > >
> > > when I use action and parameters in this way:
> > >
> > >    <map:match pattern="forms/employee">
> > >      <map:act set="employee">
> > >          <parameter name="hallo" value="value"/>
> > >
> > >          <map:generate type="serverpages" src
> ="docs/samples/forms/employee.xsp"/>
> > >          <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > >          <map:serialize/>
> > >      </map:act>
> > >    </map:match>
> >
> > Unless you are using objectMap variables, this is not necessary anyways.
> >
> > > the generated java code is not compilable:
> > >
> > >   param = new Parameters ();
> > >   param.setParameter ("hallo", substitute(listOfMaps, "value"));
> > >
> > >   if ((map = action_set_employee (cocoon_action, listOfMaps,
> > >                                         environment, objectModel,
> > >                                         substitute(listOfMaps, null),
> param)) != null) {
> > >      getLogger().debug("Action action_set_employee");
> > >      listOfMaps.add (map);
> > >
> > >     .setParameter ("hallo", substitute(listOfMaps, "value"));
> >
> > That is a problem.  This is probably a side affect of the change I made
> to key the
> > param value off of an xsl:param.  I can change the code so that if the
> parameter
> > is not set, then it won't output the call anyway.
> >
> > > The parameter is processed twice! If the map:generate etc. is used
> outside the map:act the generated code is ok:
> > >      <map:act set="employee">
> > >          <parameter name="hallo" value="value"/>
> > >      </map:act>
> > >      <map:generate type="serverpages" src
> ="docs/samples/forms/employee.xsp"/>
> > >      <map:transform src="stylesheets/dynamic-page2html.xsl"/>
> > >      <map:serialize/>
> > >
> > > I search through the sitemap.xsl for the reason but I think it will
> take me some days to find the problem.
> >
> > Is it being called instead of applied?  Let me apply my change, and it
> will get rid of _any_ instance where
> > the parameter is not set.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic