You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/07/06 15:04:50 UTC
xsp-request:set-attribute
I tried to pass information from one point to another with
<xsp-request:set-attribute name="m_id"><esql:get-string
column="id"></xsp:request-set-attribute>
sitemap.xmap:
<map:match pattern="info-*.html">
<map:aggregate element="page">
<map:part src="cocoon:/internal/info-{1}.xml" element="content"/>
<map:part src="cocoon:/internal/list-{request-attr:m_id}.xml" />
</map:aggregate>
<map:serialize />
</map:match>
that info-{1}.xml is a XSP with the line I mentioned.
request-attr:m_id always returns nothing. (also tried: {chain:m_id} =>
no go)
It should return the id of what I save there... Why it is not returning
it?
cocoon 2.1.3
- Joose
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp-request:set-attribute
Posted by Carlos Chávez <cc...@agsoftware.dnsalias.com>.
Hi joose.
Joose Vettenranta Escribio :-)
> I tried to pass information from one point to another with
>
> <xsp-request:set-attribute name="m_id"><esql:get-string
> column="id"></xsp:request-set-attribute>
I think you can not use this for your intentions.
better create a input hidden and assign the value what you want send
to the sitemap.
Something like this:
<input name="name" type="hidden">
<xsp:attribute name="value"><esql:get-string
column="id"></xsp:attribute>
</input>
later in the sitemap you can use {request-param:m_id} for access to
the value.
Cheers,
Carlos Chávez.
>
> sitemap.xmap:
>
> <map:match pattern="info-*.html">
> <map:aggregate element="page">
> <map:part src="cocoon:/internal/info-{1}.xml" element="content"/>
> <map:part src="cocoon:/internal/list-{request-attr:m_id}.xml" />
> </map:aggregate>
> <map:serialize />
> </map:match>
>
> that info-{1}.xml is a XSP with the line I mentioned.
>
> request-attr:m_id always returns nothing. (also tried: {chain:m_id} =>
> no go)
>
> It should return the id of what I save there... Why it is not returning
> it?
>
> cocoon 2.1.3
>
> - Joose
>
> --
> "Always remember that you are unique, just like everyone else!"
> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Carlos Chávez
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp-request:set-attribute
Posted by Joose Vettenranta <jo...@iki.fi>.
Hi,
I tried also with <xsp-session:set-attribute> and it seems to pass that
information to browser, but not to that another <map:part src="" /> ...
I tried to google information about how aggregate is processed (like is
it a own thread) which would explain why it is not working.. Perhaps I
just have to do some action to find out the information first and then
do same select again to get information in that <map:part place..
Any hints how I should implement this?
Of course I could do the second part as a new select like:
select * from foo,bar where foo.id={1 from sitemap} and
bar.id=foo.barid;
but then I just have to create 2 different xsp-files for both cases.
(another case is where I know bar.id already).
(cocoon 2.1.3)
Thanks, Joose
6.7.2004 kello 16:04, Joose Vettenranta kirjoitti:
I tried to pass information from one point to another with
>
> <xsp-request:set-attribute name="m_id"><esql:get-string
> column="id"></xsp:request-set-attribute>
>
> sitemap.xmap:
>
> <map:match pattern="info-*.html">
> <map:aggregate element="page">
> <map:part src="cocoon:/internal/info-{1}.xml" element="content"/>
> <map:part src="cocoon:/internal/list-{request-attr:m_id}.xml" />
> </map:aggregate>
> <map:serialize />
> </map:match>
>
> that info-{1}.xml is a XSP with the line I mentioned.
>
> request-attr:m_id always returns nothing. (also tried: {chain:m_id}
> => no go)
>
> It should return the id of what I save there... Why it is not
> returning it?
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org