Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 26866 invoked from network); 24 Jul 2004 14:29:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Jul 2004 14:29:00 -0000 Received: (qmail 43046 invoked by uid 500); 24 Jul 2004 14:28:53 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 43032 invoked by uid 500); 24 Jul 2004 14:28:53 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 43019 invoked by uid 99); 24 Jul 2004 14:28:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [128.214.205.132] (HELO post.it.helsinki.fi) (128.214.205.132) by apache.org (qpsmtpd/0.27.1) with ESMTP; Sat, 24 Jul 2004 07:28:51 -0700 Received: from [192.168.100.6] (kamner4.org.helsinki.fi [128.214.191.196]) by post.it.helsinki.fi (8.12.11/8.12.11) with ESMTP id i6OESmI3029292 for ; Sat, 24 Jul 2004 17:28:49 +0300 (EEST) Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: users@cocoon.apache.org From: Joose Vettenranta Subject: cforms binding almost working Date: Sat, 24 Jul 2004 17:29:11 +0300 X-Mailer: Apple Mail (2.618) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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