Hi Sachin Dusane On 15/06/07, Dusane, Sachinkumar <[EMAIL PROTECTED]> wrote:
Hi, I am currently trying to use Cocoon and found it very interesting.
very well, welcome on board!
But there are some queries on which I need some clarification. 1>How to use the data entered by user on CForms in the related Cocoon Action.
AFAIK, it is not a suggested practice to use CForm with the cocoon actions. It is relative simple to use CForm throughout javascript flow (I use this) or java flow. Why don't you try with it? See the samples, in that case.
2>How to pass data retrieved from database in Cocoon Action to CForms.
The binding part of CForm framework is borne to exchange data (POJO or XML Doc.) with the form Model. So ideally you can proceed this way: 1. you make the query on the db (1) 2. and set the data into a POJO (hey, Hibernate will do this for you, if you like) (1) 3. load (bind) the POJO into a predefined (using definition) model of a form (2) 4. let the user manipulate the data (at libitum) (3) 5. save (bind) the manipulated data in the model of the form into your POJO (2) 6. finally you save back the POJO information into the database (1) That's it. (1) This could be done a class that respond to DAO pattern (2) You do this in the javascript flow (3) This is a gift by CForm
Hoping for positive reply.
Any reply could be positive, if you want to ;-) I hope this can help. Regards pino -- Giuseppe Di Pierri Managing Director ______________________ Phiware Engineering Sagl via Ginevra 5 CH-6900 Lugano Tel. +41 91 260 75 55 Fax.+41 91 260 75 59 Email. [EMAIL PROTECTED] -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
