Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 92903 invoked from network); 25 Nov 2003 13:44:51 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Nov 2003 13:44:51 -0000 Received: (qmail 30175 invoked by uid 500); 25 Nov 2003 13:44:42 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 30047 invoked by uid 500); 25 Nov 2003 13:44:41 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 29939 invoked from network); 25 Nov 2003 13:44:40 -0000 Received: from unknown (HELO moon-1.humatix.nx) (80.126.64.98) by daedalus.apache.org with SMTP; 25 Nov 2003 13:44:40 -0000 Received: by moon-01.humatix.nx with Internet Mail Service (5.5.2653.19) id <4YJNLYCF>; Tue, 25 Nov 2003 14:44:40 +0100 Message-ID: From: Hugo Burm To: "'dev@cocoon.apache.org'" Subject: RE: persisting re-arranged repeater-rows Date: Tue, 25 Nov 2003 14:44:34 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Jeremy, What are you using for the Hibernate mapping? A Set or a List? I think you nee a List and set the attribute (ch 5.2 of the Hibernate ref manual) to the index of your Woody ArrayList. I guess one of the problems will be sorting after you added a new item, because the new item does not yet have an id in Woody. Hugo Burm > -----Original Message----- > From: Jeremy Quinn [mailto:jeremy@media.demon.co.uk] > Sent: 25 November 2003 13:47 > To: dev@cocoon.apache.org > Subject: persisting re-arranged repeater-rows > > > Hi All, > > I am struggling with persisting re-arranged repeater rows. > > I have a form that edits an Album Bean which has a (java.util.List) > 'Resources' Property which is populated by Resource Beans. > > I have the List of Resource Beans represented in the form as a > repeater-widget, with move-up, move-down buttons. > > When I click one of the up/down buttons, the repeater-rows get > re-arranged correctly in the form. > > When I save the Album (I am using Hibernate, with cascading) > the change > in the ordering is not persisted. > > I am clearly missing something ..... has anyone else had with > a similar > issue? > > Any suggestions? > > Thanks for any help > > regards Jeremy >