On Wed, 2003-11-05 at 18:51, Antonio Gallardo wrote: > Hi: > > I am trying to do a "form.save(bean)" from an empty displayed form.I have > 2 days with this sample and still not working. :-( > > > My problem is that inside the "repeater" there is only 1 value (res_id) of > datatype integer. > > Binding just save the first 2 values and an empty repeater.
Is the res_id field a field that the user can edit? The current repeater-binding assumes that new rows are those with an empty id field (res_id your case). Thus if these are editable by the user and the user puts a value in them, the repeater binding will not detect that these are new rows. However, it is of course possible to implement alternative repeater-binding strategies. One that's also available is wb:simple-repeater (see javadoc of the class SimpleRepeaterJXPathBindingBuilder). This binding works by first removing all items, and the adding all the items in the repeater. If this approach is not acceptable for you, I think it is possible to adjust the "normal" repeater binding so that it detects new id's as new rows (instead of only null id's). > > BTW, A question why we need to define the unique-path attribute as > "@res_id" AFAIK, a collection cannot have an attribute called res_id. > Please explain. :-D It is not an attribute of the collection, but of the individual objects in the collection. Hope this helps. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED]
