Hi all
I'm learning to use the library example on the wicket website. But I found
that once I got some results by search and I clicked one link to go into
that detail page, then I actually could go back to the previous page. The
example on the wicket website just provides a link to home, not a real
"Back" link.

For example, I'm searching some hotels. I input a keyword in the search bar
and then get a list of accommodations. Then I click on one record and I get
a list of rooms of that accommodation. Now if I click on one room it will go
to the detail page of that room. What if I want to go back to the previous
page containing a list of rooms? Furthermore, what if I want to go back to
that page including a list of accommodation??

I just put a small piece of my code here. this is the method from the wicket
example page. How can I make a "back" link?
I really need this. otherwise my mentor will kill my marks......:-( Please
help me. Many thanks~~


public static BookmarkablePageLink link(final String name,
                        final Accommodation accommodation) {
                clickedAccommodation = accommodation;
        
                final BookmarkablePageLink link = new BookmarkablePageLink(name,
                                RoomResultListPage.class);
                
                if (accommodation != null) {
                        link.setParameter("aid", accommodation.getAid());
                        
                        link.add(new Label("name", new 
Model(accommodation.getName())));
                } else {
                        link.add(new Label("name", "No matched rooms - 
xingxing"));
                        link.setEnabled(false);
                }

                return link;

        }
-- 
View this message in context: 
http://www.nabble.com/%22go-back%22-problem-tp20057504p20057504.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to