cocoon-users mailing list archives

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

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-----
Von: cocoon-users-return-45037-m_rolappe=web.de@xml.apache.org
[mailto:cocoon-users-return-45037-m_rolappe=web.de@xml.apache.org]Im Auftrag
von jcplerm
Gesendet: Dienstag, 21. Januar 2003 02:35
An: cocoon-users@xml.apache.org
Betreff: Non-string sitemap custom parameters


Hello,

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:transform>
                  <map:serialize type="html"/>
         </map:act>
      </map:act>
   </map:match>


"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?

Thanks,

Julio Lerm
Chicago, IL


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

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


Mime
View raw message