You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Post <ba...@ifrance.com> on 2002/09/13 14:59:23 UTC
big bug in latest CVS ? Basic custom Action not working
Hello,
I have the following, with CVS built 10 minutes ago, same bug with
yesterday's one... :
<map:match pattern="xmldoc/*">
<map:act type="xmldocexists">
<map:parameter name="taminoUri"
value="http://i3in0/tamino/BAEPP/BAEPP"/>
<map:parameter name="query" value="Template[@Id='{../1}']"/>
<map:redirect-to uri="login"/>
</map:act>
<map:redirect-to uri="http://google.fr"/>
</map:match>
It does not work : {../1} has an empty value... I just println the "query"
parameter as soon as I get it in the action class.... see below.
If I use {1} which is wrong, I get the action executed twice : a first time
with the value of what is
matched by the star, a second time with "login" passed as value of "query"
parameter !!
This is really alarming... ;-o or maybe I need some rest...
Any clue ? The same bug if I use cocoon-2.1-dev.jar from 09/03, but all the
other newest jars.
public class XMLDocumentExistsAction extends ComposerAction
implements ThreadSafe {
String uri = "";
String query = "";
public Map act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters param)
{
Map sitemapParams = new HashMap();
try{
this.uri = (String) param.getParameter("taminoUri");
System.out.println("new query to :" + this.uri);
this.query = (String) param.getParameter("query");
System.out.println(this.query);
}
Babs
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: big bug in latest CVS ? Basic custom Action not working
Posted by Vadim Gritsenko <va...@verizon.net>.
Barbara Post wrote:
>Hello,
>
>I have the following, with CVS built 10 minutes ago, same bug with
>yesterday's one... :
>
><map:match pattern="xmldoc/*">
> <map:act type="xmldocexists">
> <map:parameter name="taminoUri"
>value="http://i3in0/tamino/BAEPP/BAEPP"/>
> <map:parameter name="query" value="Template[@Id='{../1}']"/>
>
You want {1} here to get * from xmldoc/* matcher.
> <map:redirect-to uri="login"/>
> </map:act>
> <map:redirect-to uri="http://google.fr"/>
> </map:match>
>
>It does not work : {../1} has an empty value... I just println the "query"
>parameter as soon as I get it in the action class.... see below.
>
>If I use {1} which is wrong, I get the action executed twice : a first time
>with the value of what is
>matched by the star, a second time with "login" passed as value of "query"
>parameter !!
>
If login is handled by same xmldoc/* matcher, then this is correct behavior.
Vadim
>This is really alarming... ;-o or maybe I need some rest...
>Any clue ? The same bug if I use cocoon-2.1-dev.jar from 09/03, but all the
>other newest jars.
>
>public class XMLDocumentExistsAction extends ComposerAction
>implements ThreadSafe {
> String uri = "";
> String query = "";
>
>public Map act(Redirector redirector,
> SourceResolver resolver,
> Map objectModel,
> String source,
> Parameters param)
> {
> Map sitemapParams = new HashMap();
> try{
> this.uri = (String) param.getParameter("taminoUri");
> System.out.println("new query to :" + this.uri);
> this.query = (String) param.getParameter("query");
> System.out.println(this.query);
> }
>
>Babs
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>