Good afternoon everyone. I'd be amazed if no-one had yet faced difficulty editing inputTexts in a table and an inner table at the same time. Does this ring no bell at all?
Francisco On Nov 5, 2007 11:40 AM, Francisco Passos <[EMAIL PROTECTED]> wrote: > Good morning everyone. > > I've got a list of objects with a property which I need to edit (a > quantity). Then, alongside that property I have a list of a second type of > objects with a similar editable property (a quantity as well). I need to let > the user edit these quantities, but I need to assure that the outer quantity > is the sum of the inner quantities. Yes, I know it would be best not to have > the outer edit at all, but it is a requisite. > > So, I used a tr:table for the outer objects (with an inputText for the > outer quantity) and the detailStamp facet in which I placed a second > tr:table with the inner objects and an inputText to edit the inner > quantities. > > Then I used a button to invoke an action on the bean that has the data, > where I sum the inner fields and check the sum against the outer field. > > Suppose I have an outer line with the value 100 and two inner lines with > 50 each. All is well. Now, if I edit the outer to 101 and one of the inner > to 51, then click the button, I fail the verification, because the inner > field still sum up to 100, instead of 101 ! I suppose there is a very good > explanation for this, lifecycle-wise. > > Can anyone enlighten me why this happens and give me a hint on how to > solve it? > > Thank you, > Francisco >

