alani wrote:
> 
> hello
> 
> I'm still trying to finish my prototype with Jetspeed. But I'm really
> stuck at a problem with passing a parameter to a Stylesheet.
> 
> I have used the XSLPortlet as a base for my own portlet. There I call
> the Method transform from the class SimpleTranform.
> 
> It is possible to pass parameters containing numbers, but I am not
> able to pass a URL. In my Stylesheet the Value of the parameter
> is lost.
> 
> portlet :
> 
> this_uri = URILookup.getURI( URILookup.TYPE_HOME, URILookup.SUBTYPE_NONE, 
>(Portlet)this, data );
> hash.put( "URI", this_uri );
> ...
> content = new ClearElement(
>         SimpleTransform.transform( getPortletConfig().getURL(), stylesheet, hash ) );
> 
> and in the stylesheet
> 
> ..
> <xsl:param name="URI">none</xsl:param>
> <h1>Before:<xsl:value-of select="$URI"/>:After</h1>
> ..
> 
> if I pass no parameter to the Stylesheet the output is : Before:none:After
> if I pass a number ( ex. 10 ) to the Stylesheet the output is : Before:10:After
> if I pass a String ... the param gets lost, output is : Before::After
> 

It is funny, because SimpleTransform.java assumes that all parameters
are Strings, and casts them to (String) before setting it in the
Stylesheed. Could you repeat the experiment printing the key and value
just before line 177 of SimpleTransform.java?

> is this me, not unterstanding how to pass these parameters, or is it a bug
> a) in Jetspeed or b) in xalan ??
> 
> ok, and what is the best way to get a URL pointing to the actual pane ?
> if I use getURI( URILookup.TYPE_HOME, ... ) I always get a URL pointing
> to the first pane.
>

You will need to use a DynamicURI(request) and add the current
parameters to it. It is tricky, because post parameters cause problems,
and there is no separation of parameters belonging to different
portlets, and you have to code knowledge about the page as a whole. We
are working to find better ways to refer to "internal" URIs, i.e., URIs
used to store ONLY knowledge about the current webapp state.
 
> thanks
> 
> alani
> 
> --
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/[email protected]/>
> List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to