cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giuseppe Di Pierri" <giuseppe.dipie...@gmail.com>
Subject Re: Help On Cocoon CForms
Date Fri, 15 Jun 2007 21:31:08 GMT
Hi  Sachin Dusane

On 15/06/07, Dusane, Sachinkumar <sachinkumar.dusane@capgemini.com> 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. giuseppe.dipierri@phiware.ch
--

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


Mime
View raw message