I made 2 Submit components with different listener methods and pass the selected element with selected / tag attributes and it works fine.
On 9/5/06, Jani Lindqvist <[EMAIL PROTECTED]> wrote:
Hi All, I have a page that needs to list edit/save forms for elements contained in a collection. For every element we need to give save button and a button to mark it as complete, that contains a bit more logic. before the completion button was added to the page i just put everything in one form, and added a InvokeListener for every element that handled the saving (as in chapter 11 @ enjoyWebDevWithTapestry). For the completion button i tried addind a Submit component with an id as parameter, so i could add the completion logic, but for some reason it doesnt seem to get called at all. If it would, the life cycle would do the InvokeListener methods first and then the Submit listener, is this correct? I also tried to move the Form component to give every element own form with 2 different Submit components, with different listener methods, but when i click either of the buttons i get an exception from ognl, since the element object where a value was taken into the TextField, isnt there any more (it´s null). i tried to persist the collection in client and session but it doesnt help at all. i still get the same exception. Is there somewhere somekind of example how to do this? what am i doing wrong here? We´re using Tapestry 4.1