Hmm. I don't get the reason why to use page link. Don't you think using regular link for this is more elegant?
new Link()
{
   public void onClick()
   {
      setResponsePage(new MyPage(...));
   }
}

ahh look Another option to use!  :)
This is also possible the only thing you don't have then is linkTo() (enabling and disabling the link) And that linkTo() if you really want to check if it is the same page (and not the same page but a different instance)

   public boolean linksTo(final Page page)
   {
       if(page.getClass() == pageLink.getPageIdentity())
      {
PageParameters pp = ((MyPageLink)pageLink).getPageParameters())
                  String value = pp.get("myparam");
                  if( ((MyPage)page).getMyParam().equals(value))
                  {
                        return true;
                  }
      }
      return false;
   }

Then you have a PageLink that disables/enabled depending on the Page and checks if the Instance of the page has the same state as you expect it to be.

johan



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to