Even though version 1.3.3 has been released 1.3.2 is fine.
Theoretically only this is required:
@Override
public final void onClick() {
BaseGroup group = (BaseGroup) getModelObject();
groupManager.deleteGroup(group.getId());
}
But it might be possible the model of the listview is loaded before
you delete the item, in that case the listview won't show the current
state until the model is detached.
could you try the following:
@Override
public final void onClick() {
BaseGroup group = (BaseGroup) getModelObject();
groupManager.deleteGroup(group.getId());
listview.removeAll();
listview.getModel().detach();
}
Maurice
On Mon, Apr 14, 2008 at 3:28 PM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> I am using the normal Link. My ListView Model takes data from
> LoadableDetachableModel. I think if the web page should refresh each time the
> Link is clicked, than the LoadableDetachableModel::load() method should be
> called but this does not happen.
> Is it possible that I am using to old wicket version. I am using wicket
> 1.3.2.
>
> If the version is right, please just take the fact that for some reason the
> refresh of web page did not proceed. Is there any way how to reload the page
> manualy in the onClick event of normal Link object?
>
> As I write in previos mails I try call
>
> @Override
> public final void onClick() {
> BaseGroup group = (BaseGroup) getModelObject();
> groupManager.deleteGroup(group.getId());
> getPage().modelChanged();
> setResponsePage(getPage());
> setRedirect(true);
> }
>
> but this does not work too. Any idea how to make it different way?
>
> hierarchy of my page is
>
> Page
> ListView
> ListItem
> Link remove
>
> And I need to reload whole page or at least the ListView.
>
>
> Thanks for any advice
>
> Milan
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>