You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2004/06/11 15:57:21 UTC

[flowscript] Add value into the request object

Hi all,

I tried to add a new parameter the the request object then doing a redirection.


function addrequest(){
cocoon.request.setAttribute("my_parameter", my_value);
cocoon.redirectTo("mypage?myparameter="+cocoon.request.getAttribute("my_parameter");
}

Why is this not working ?

Lionel


Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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


Re: [flowscript] [SOLUTION] Add value into the request object

Posted by Stephan Coboos <cr...@gmx.net>.
Antonio Gallardo wrote:

>AFAIK, it should be:
>
>cocoon.redirectTo("mypage",{"my_parameter": my_value});
>  
>

But it can be {my_parameter:my_value}, too (no quotes)! But your version 
is more clear and the better one ;-)

Regards
Stephan

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


Re: [flowscript] [SOLUTION] Add value into the request object

Posted by Antonio Gallardo <ag...@agssa.net>.
Lionel Crine dijo:
> OK I found the error.
> I did not use the redirectTo method correctly:
>
> I should have written cocoon.redirectTo('"mypage",{my_parameter;
> "my_value"});

AFAIK, it should be:

cocoon.redirectTo("mypage",{"my_parameter": my_value});

Best Regards,

Antonio Gallardo


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


[flowscript] [SOLUTION] Add value into the request object

Posted by Lionel Crine <cr...@4dconcept.fr>.
OK I found the error.
I did not use the redirectTo method correctly:

I should have written cocoon.redirectTo('"mypage",{my_parameter; "my_value"});
Now It's working.

Lionel



At 10:05 14/06/2004 +0200, you wrote:
>The variable is empty.
>Oh yes, I forgot the ending bracket. But this is not related to my problem.
>
>There is no error message.
>
>At 17:26 11/06/2004 +0200, you wrote:
>>Lionel Crine wrote:
>>
>>>Hi all,
>>>
>>>I tried to add a new parameter the the request object then doing a 
>>>redirection.
>>>
>>>
>>>function addrequest(){
>>>cocoon.request.setAttribute("my_parameter", my_value);
>>>cocoon.redirectTo("mypage?myparameter="+cocoon.request.getAttribute("my_parameter"); 
>>>
>>>}
>>>
>>>Why is this not working ?
>>What is not working? Exceptions..? Please more information. You have 
>>forgotten a ending brake ).
>>
>>Regards
>>Stephan
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>
>Lionel CRINE
>Ingénieur Systèmes documentaires
>Société : 4DConcept
>22 rue Etienne de Jouy 78353 JOUY EN JOSAS
>Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org

Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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


Re: [flowscript] Add value into the request object

Posted by Lionel Crine <cr...@4dconcept.fr>.
The variable is empty.
Oh yes, I forgot the ending bracket. But this is not related to my problem.

There is no error message.

At 17:26 11/06/2004 +0200, you wrote:
>Lionel Crine wrote:
>
>>Hi all,
>>
>>I tried to add a new parameter the the request object then doing a 
>>redirection.
>>
>>
>>function addrequest(){
>>cocoon.request.setAttribute("my_parameter", my_value);
>>cocoon.redirectTo("mypage?myparameter="+cocoon.request.getAttribute("my_parameter"); 
>>
>>}
>>
>>Why is this not working ?
>What is not working? Exceptions..? Please more information. You have 
>forgotten a ending brake ).
>
>Regards
>Stephan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org

Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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


Re: [flowscript] Add value into the request object

Posted by Stephan Coboos <cr...@gmx.net>.
Lionel Crine wrote:

> Hi all,
>
> I tried to add a new parameter the the request object then doing a 
> redirection.
>
>
> function addrequest(){
> cocoon.request.setAttribute("my_parameter", my_value);
> cocoon.redirectTo("mypage?myparameter="+cocoon.request.getAttribute("my_parameter"); 
>
> }
>
> Why is this not working ?
>
What is not working? Exceptions..? Please more information. You have 
forgotten a ending brake ).

Regards
Stephan

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