For the various ids and their respective methods: 1. Create a hidden text field. 2. Call a javascript function before submitting the page. This javascript takes ID as an argument. 3. The ID is saved in the hidden text field and the page is submitted. 4. Now call getDeleteItem() and get the ID to be deleted.
I hope this helps, Nitin Dubey --- Michael McGrady <[EMAIL PROTECTED]> wrote: > At 05:22 AM 8/10/2004, you wrote: > >Thanks, that goes some way...but not all the way > though. A common > >situation where a dynamic page displays 0....n > items with different > >identifiers. For example, an item list is fetched > from database, and page > >contains delete buttons for items 23, 67, 101 and > 128. I do not think you > >can use this approach to solve that problem. You > would have to magically > >create getDeleteItem23, getDeleteItem67....methods > in your class. > > > >I'm surprised that this kind of common problem is > not handled internally > >by the framework, and there is a need to use quite > strange workarounds > >(get - methods that modify state of the form). > > You could just read the values of the parameter > names for <input > type='image' name='button.blah0'>, <input > type='image' > name='button.blah1'>, ... , <input type='image' > name='button.blahN'> then > when you sort out a name such that the name begins > with "button" you could > read the text between the dots, viz., e.g., "blah0" > as the command. Since > the position of x and y is of no interest to us, I > don't know why the > struts form is popluated with > [form].getButton().getBlah0().setX(Integer x) > anyway. > > I am looking into this. > > Michael > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]