cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Communication between Sitmap and Action
Date Sat, 23 Nov 2002 13:25:43 GMT
Hi Robert,

I can see at least one thing:

Robert Sösemann wrote:
> I have this matcher with an action which passes 2 parameters to the included
> generator. Also the generator must use the two parameters that are given to
> him.
> 
>  ######### SITEMAP ###########################
> ...
>     <map:match pattern="**item_*.html">
>         <map:act type="url-extract">
>             <map:generate src="logicsheets/item_view.xsp" type="xsp">
>                 <map:parameter name="article_id" value="{2}"/>

This has to be {../2} ------------------------------------^^^.

Joerg

>                 <map:parameter name="base-path" value="/rauser-cocoon"/>
>             </map:generate>
>         </map:act>
> ...
> ########### ACTION url-extract #######################
> ...
>     request.setAttribute("unterrubrik", unterrubrik);
>     request.setAttribute("oberrubrik", oberrubrik);
> 
>     Map sitemapParams = new HashMap();
> 
>     return sitemapParams;
> ...
> ########### XSP item_view.xsp #######################
> ...
>         <xsp:attribute
> name="BASEPATH"><xsp:expr>parameters.getParameter("base-path","default_value
> ")</xsp:expr></xsp:attribute>
> 
>         <esql:connection>
>             <esql:pool>mysql_pool</esql:pool>
> 
>             <esql:execute-query>
>                 <esql:query>
>                     SELECT o.verzeichnis, o.titel, o.id, u.verzeichnis,
> u.titel, i.id, i.ueberschrift, i.pdfdruck , i.bild, i.zusammenfassung,
> i.text, i.erstellungsdatum, b.name, i.typ_kuerzel
>                     FROM infoitem i, benutzer b, unterrubrik u, oberrubrik o
>                     WHERE i.id =
> <xsp:expr>parameters.getParameter("article_id","default_value")</xsp:expr>
>                     AND b.kuerzel = i.benutzer_kuerzel
>                     AND i.unterrubrik_id = u.id
>                     AND u.oberrubrik_id = o.id
>                     AND u.verzeichnis = '<xsp-request:get-attribute
> name="unterrubrik"/>'
>                     AND o.verzeichnis = '<xsp-request:get-attribute
> name="oberrubrik"/>'
>                 </esql:query>
>                 <esql:results>
>         ...
> ################
> 
> Is it correct to access their value in the item_view.xsp like that? I always
> get: "Error compiling item_view_xsp: Line 0, column 0: error: variable
> debug_enabled might already have been assigned to 1 error "??????
> 
> Maybe some can help me?!


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