Use an AJAX link inside a panel that you can replace via AJAX? Once the link is clicked it will "go to back" to the page set the flag I'm on delete mode and replace itself. All you have to do is has a model that says if(onDeleteMode) return "Do you really want to delete XYZ"? else { return "Delete Record" }
and change what you do on your action if(onDeleteMode) { delete record and repain the grid (via AJAX) } else { setOnDeleteMode(true); repaints myself via AJAX } This is just one possibility out of many... Best, Ernesto On Wed, Sep 30, 2009 at 11:41 AM, Peter Arnulf Lustig <uuuuu...@yahoo.de>wrote: > Hi Ernesto, > > > I don't get it: How can I change the Label-Text? When I try to change the > Model of the component Label, nothing happens. The page reloads and the > Label has the old Text (not the new one which is meant to be changed) > > > > > ----- Ursprüngliche Mail ---- > Von: Ernesto Reinaldo Barreiro <reier...@gmail.com> > An: users@wicket.apache.org > Gesendet: Mittwoch, den 30. September 2009, 11:38:33 Uhr > Betreff: Re: How would you realize a "delete"-Link in a datagrid row? > > What about replacing the link. e.g. via AJAX, with a new one containing > the "Do you really want to delete xyz" warning... that once clicked > actually > deletes your entry... and refreshes the datagrid. You could even use the > same link and have a flag that says "userWantsToDeleteRow" and use it to > conditionally change the actions to do and the contents to display. > Best, > > Ernesto > > On Wed, Sep 30, 2009 at 11:29 AM, Peter Arnulf Lustig <uuuuu...@yahoo.de > >wrote: > > > Hi, > > > > I'd like to create a delete link where you can delete a row in a > datagrid. > > But when you click on the delete link, the delete label should change and > a > > warning occurs: "Do you really want to delete xyz". > > After the second click it finally deletes the content. > > > > How can I achieve that? Could you verbalize the procedure? > > > > Thanks!! > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >