I don't get it completely
What doe you want to do in youre PageLink exactly?

You can redirect to any page you want there but are you saying you do this:

onClick()
{

  setResponsePage(new MyPage());
}

and in that MyPage you just set another response page again?

Why not directly the good one then?

This goes wrong ofcourse because first MyPage() does set in its constructor a page
then then the setResponsePage() in the link it self will set mypage again.

Should we go around that? for example:


onClick()
{
  MyPage page = new MyPage()
 if(getResponsePage() != null or the currentpage where the link is on)
  {  setResponsePage(page); }
}

but i find that a hack.

You should do that in checkAccess() or do set directly the right one.

johan




On 12/14/05, Maurice Marrink <[EMAIL PROTECTED]> wrote:
Hi,

When using a bookmarkablepagelink for a page it is possible to set a
responsepage in the constructor. for example

public class dummypage extends webpage
{
  public dummypage()
  {
     setResponsepage( anotherpage.class);
  }
}

and then use new Bookmarkablepagelink(dummypage.class) to go to
anotherpage.class.

We have several menu buttons ((bookmarkable)pagelinks) on our pages
that show or don't show depending on if the user has access to the
page class in the link. However sometimes the we use anotherpage on
several locations in our app. so if we want the user to have access to
that page but not to the menu button. So we placed these dummy pages
between them. This worked nicely until we made a change which forced
us to use normal pagelinks instead of bookmarkablepagelinks for the
menu buttons. Since the setresponsepage trick does not work for those
is it possible to redirect in some other manner to an entirely
different page.
For the record i am not talking about another html page but a
completely new page since that page is used also on other places in
the app and i don't want to duplicate the html for that page.

Any ideas?

Thanks,

Maurice


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to