You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gregory Steuck <gr...@buildpoint.com> on 2001/10/10 01:28:42 UTC

[C2] What am I doing wrong? (action -> xsp parameter passing)

Eduardo,

Here's how I managed to pass parameters from an action to an xsp page:

sitemap:

<map:act type="project-available">
  <map:generate src="docs/project_extract.xsp">
  <map:parameter name="xsp_pid" value="{pid}"/>
</map:generate>

action:
    public Map act (Redirector redirector,
                    SourceResolver resolver,
                    Map objectModel,
                    String source,
                    Parameters params) {
        Map sitemapParams = new HashMap();
        sitemapParams.put("pid", projectIdString);
        return sitemapParams;
  }

xsp:

<xsp:expr>parameters.getParameter("xsp_pid","BUG_IN_SITEMAP")</xsp:expr>

Hope it helps.

Thanks
Greg

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>