cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joose Vettenranta <jo...@iki.fi>
Subject cforms binding almost working
Date Sat, 24 Jul 2004 14:29:11 GMT
Hi,

I was able to get stuff from database and then make as cforms..

So this works:

         bean.setName ('Dad 1');
         child = new Packages.net.vettenranta.Child ();
         child.setName ('Child 1');
         bean.addChild (child);
         form.load(bean);
         form.showForm("forms/edit.html");
         form.save(bean);
         dao.insert (bean, factory);

But this does not:

	bean.setId (id);
	bean = dao.retrieve (bean, factory);
	form.load(bean);
	form.showForm("forms/edit.html");
	form.save(bean);
	dao.update (bean, factory);

What happens when doing this?

Every repeater-row element is INSERTed again, like CForms thinks that 
all of those are new childs. If I remove those rows, nothing will 
happen to them, only the ones which were left, was INSERTed.

I have tested with a script that this works: 
http://joose.iki.fi/ojb/#test

On that same url there is also binding file I used. But not the 
javascript I used to test forms, but it's showed on this mail.

Thanks,

Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


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


Mime
View raw message