cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: How do we call Actions from CForms
Date Mon, 19 Jul 2004 10:49:12 GMT


Madhav_Matta wrote:

> Hello Marc
> Thanks for your reply
> 

pls, keep discussions on the list!

> Are you referring to this example. This uses flowscript. Can I get a example

it doesn't use flowscript.
in fact it doesn't *use* anyhting.

point is: it is not that form definition that decides from where and 
hoew it is being used...

> in which a CForm directly calling a Action.
> 

the misconception is here: the form doesn't call anything, it is 
passive. (it's the lowest in the food-chain, the puppet-on-the-string 
abused by each and any controller that desires)

so the form is referenced from the controller (be that an action, 
flowscript or whatnot) see:

http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/acting/MakeFormAction.java?annotate=1.1#61

and then placed into the request and/or session context so the choosen 
(by the controller) view can link in its value into some template:

http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/acting/MakeFormAction.java?annotate=1.1#64

that template must have a form/@action attribute pointing to the url 
handling it:

http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/forms/form1_template_action.xml?annotate=1.5#22

The sitemap will need to declare that URL to be handled by an action again!

http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/sitemap.xmap?annotate=1.10#89

(BTW: you would have arrived here if you had done a local search in the 
sitemap for the action-names referenced at the position I guided you 
earlier. Not that I mind helping you some more, I'm just assuming you 
can use the extra help in discovering how the knots are tied together here)


hoping this showed the missing link,

-marc=

> http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/forms/
> form1.xml
> 
> Regards
> Madhav
> 
> -----Original Message-----
> From: Marc Portier [mailto:mpo@outerthought.org] 
> Sent: Monday, July 19, 2004 3:37 PM
> To: users@cocoon.apache.org
> Subject: Re: How do we call Actions from CForms
> 
> You will find most examples grabbing the entered values using flowscript.
> 
> You can however still use actions in combintation with CForms, see 
> sample 1 in the distribution for how to tackle that.
> 
> (http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/sitem
> ap.xmap?annotate=1.10#33)
> 
> regards,
> -marc=
> 
> Madhav_Matta wrote:
> 
> 
>>How can we call Action from CForms and pass the values submitted in the 
>>form to the action class. To incorporate the same which Action class 
>>from cocoon should I Extend?
>>
>> 
>>
>>Information on this appreciated.
>>
>> 
>>
>>Thanks
>>
>> Madhav Matta
>>
>> 
>>
>>**************************************************************************
>>
>>This email (including any attachments) is intended for the sole use of 
>>the intended recipient/s and may contain material that is CONFIDENTIAL 
>>AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or 
>>copying or distribution or forwarding of any or all of the contents in 
>>this message is STRICTLY PROHIBITED. If you are not the intended 
>>recipient, please contact the sender by email and delete all copies; 
>>your cooperation in this regard is appreciated.
>>
>>**************************************************************************
>>
> 
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

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


Mime
View raw message