cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Rolappe" <>
Subject AW: Non-string sitemap custom parameters
Date Tue, 21 Jan 2003 02:10:52 GMT

as you may know, actions get parameters via avalon Parameters. if you look
at the API you see that the parameters in the end can only contain strings.
so you have no direct way to pass objects of other type.

but you could pass your objects e.g. via request/session attributes. have a
look at the respective docs/API.

-----Urspr√ľngliche Nachricht-----
[]Im Auftrag
von jcplerm
Gesendet: Dienstag, 21. Januar 2003 02:35
Betreff: Non-string sitemap custom parameters


I need to pass an object of arbitrary type from one action down to another
along a sitemap pipeline, but unfortunately it seems that they are all cast
to String.

This is an example:

   <map:match pattern="myHello2.html">
       <map:act type="ObjectRetriever">
         <map:act type="CheckParamType">
              <map:parameter name="objParam" value="{objParam}"/>
                  <map:generate src="jlerm/test1.xml"/>
                  <map:transform src="jlerm/test1.xsl">
                        <map:parameter name="zzz" value="20"/>
                        <map:parameter name="objParam" value="{objParam}"/>
                  <map:serialize type="html"/>

"ObjectRetriever" puts an object into its return hashmap, with key
"objParam". It is passed to "CheckParamType" with the same name.
Unfortunately, tracing code in "CheckParamType"  logs the fact that objParam
is of type java.lang.String, when it should be something else (like a
Vector, for instance).

Any ideas how I could do that?


Julio Lerm
Chicago, IL

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