HI Steve; When i want to maintain bookmarkable pages, i normally pass the record primary key in the PageParameters map . Once i have the primary key on the next page, i can use my dao to retrieve the object and may be "float a div" to display the record.
On Tue, Aug 17, 2010 at 10:57 AM, Steve Mactaggart < [email protected]> wrote: > Hi all, > > I have a simple problem that I wanted to cast out to the wider Wicket > community for a best practice. > > We try and use BookmarkablePageLinks for as much as we can, obviously so > that pages can be bookmarked. Therefore nearly every page is constructed > via the PageParameters method. > We have a lot of pages that list items, allow a user to create a new item, > edit, delete, a pretty standard CRUD workflow. > > The problem is that I want to notify the user about the the save of the > save > on the next page. If the save fails we stay on the edit page, and that > works fine. > But if the save succeeds we redirect back to another page using > setResponsePage(Class, PageParams). > > What I want to do on this page (no matter what page it is) is to display a > little floating div showing the record just saved, its transaction # etc. > > In the old world I would just push my saved object notification into the > Session, and then on all pages check for this value and then display and > remove it. > Is this still the best practice? > > I was looking at using something like > getSession().setMetaData(MetaDataKey, Serializable) to store the the > notification details, but couldn't see a way to remove the MetaData (unless > setting to null is right) > > Is this right or is there a more "wicket" way of doing this. > > Cheers, > Steve >
