That's good to know! That does have to be on the docs. You can always edit the pages by yourself if you want to, they are Wiki's after all.
Kind Regards, Jan ----- Original Message ----- From: "Stefan Klein" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 02, 2004 3:57 PM Subject: limitation in woody-repeater binding and collections > Hi, > > here's an issue I came across the other day and it took me quite a while to figure out, so I thought > I'd let everyone know and maybe someone could include a note in the WoodyBinding > documentation on the wiki: > > I had a bean with a Collection of type HashSet which I was trying to bind to a Woody Form. > Reading it worked perfectly, updating, too. But inserting a couple of new elements at a time > caused a problem: The binding seemed to save only some elements and create empty collection > elements (no values set) for others. > > Tracing the problem through the woody code, I realised that the code implies the use of ordered > collections such as LinkedList, ArrayList... > Woody first creates a new element instance and adds it to the collection. It then obtains it from > the collection using jxpath syntax "mybean/collection[count]" to fill in the values. "count" is the > new number of elements in the collection (after insertion) which assumes that the new element > has been added at the end. This is true for Lists, but not for my HashSet. So, in fact, any odd > element would be retrieved, possibly the new one and possibly not. That produced an > unpredictable behaviour where element values would be overwritten and others left blank. > > Maybe that could be pointed out more clearly on the wiki page where it only says that the property > has to be of type Collection. Might save others some time. > > Thanks > Stefan > ____________________________________________________________________________ __ > Nachrichten, Musik und Spiele schnell und einfach per Quickstart im > WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
