cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Bounds" <>
Subject Passing parameters to a logicsheet using xsp:param
Date Fri, 03 Jan 2003 11:59:08 GMT
I'm trying to write a logicsheet that accepts dynamic parameters from the
XSP page (e.g. maybe request parameters, or session attributes), and uses
them to request data from our application. I'd like the xsp code to look
something like this:

   		String sortParameter = request.getParameter("sort");

	   		<xsp:param name="sortBy">
				<xsp:expr>sortParameter</xsp:expr>								</xsp:param>

What do I need to put in my logicsheet code to pick up the "sortParameter"
value? At the moment I've got the following:

<xsl:template match="parameters:categories">

  <xsl:variable name="sortBy">
      <xsl:when test="sortBy">
        <xsl:call-template name="get-nested-content">
          <xsl:with-param name="content" select="parameters:sortBy"/>

		   System.out.println("Got value: " + "<xsl:copy-of select="$sortBy" />");


 <xsl:template name="get-nested-content">
    <xsl:param name="content"/>
      <xsl:when test="$content/*">
        <xsl:apply-templates select="$content/*"/>
      <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise>

Sorry if this is a stupid question, but I've been unable to find any
documentation that  describes this. I'd be very grateful for any help!


Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message