Ok, thanks

2005/12/15, Johan Compagner <[EMAIL PROTECTED]>:
> Again why don't you do the check you do in C (the setResponsePage())
> why don't you do that in a Link itself?
>
> Currently it is just not supported or if you do want it make youre own
> pagelink
> as i described above so don't do:
>
> setResponsePage(new Page()) directly but
> Page page = new Page();
> /// CHECK now first if nothing was set already then do or don't do
> setResponsePage(page);
>
> johan
>
>
>
>
> On 12/15/05, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> >
> > I'll try to explain more.
> > First we had a bookmarkablepagelink (call it lA) to page A. this link
> > uses jaas to decide if it should show itself. accessible from page A
> > are a number of similar bookmarkablelinks to other pages. Page A is
> > also accessible from Page B.
> > Because the link lA is something like a menu for site operators only
> > we don't want to show it to all people who may access page A via page
> > B.
> > But because we grant rights for Page A in jaas it also shows the link
> > lA, which is not what we want.
> > So i used a little shortcut to prevent this. I made page C which in it
> > constructor does only setResponsePage(A). And added Page C in the jaas
> > policy for the site operators. So now all people who need can access
> > Page A but only site operators can see the link lA.
> > I realize i could use a different security strategy for this link so
> > that it nolonger checks the page it links to but something else,
> > however this sollution was way faster implemented.
> > This security check does happen in checkaccess btw.
> >
> > Then we changed link lA from bookmarkable to a regular pagelink (same
> > security) because we needed to override the onclick (nothing fancy, it
> > still calls the super).
> > And using setresponsepage in the constructor does not work for pagelinks.
> >
> > So the question is, is there another way to mimic the behaviour i did
> > with the bookmarkablepagelink and the dummy page or do i have to
> > rewrite the security check for this link?
> >
> > Thanks,
> >
> > Maurice
> >
> > 2005/12/14, Johan Compagner <[EMAIL PROTECTED]>:
> > > 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
> > > >
> > >
> > >
> >
> >
> > -------------------------------------------------------
> > 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
> >
>
>


-------------------------------------------------------
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&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to