Re: [Wicket-user] After redirection doRender() still called

2005-12-25 Thread Maurice Marrink
you could use an IAuthorizationStrategy to perform a check at the
constructor of your page.
This is from the java doc
/**
 * Authorization strategies control on a low level how authorization is implied.
 * A strategy itself is generally not responsible for enforcing it. What a
 * strategy does do is tell the framework whether a component may be created
 * (especialy usefull for implementing secure bookmarkable pages and components
 * that should always be secure no matter what environment they are put it),
 * whether it may be rendered (which can result in components being 'filtered'
 * from a page, or triggering the page to not be rendered at all and redirecting
 * to a error or logon page), and whether a component may be enabled (thus
 * controlling it's reachability etc) at all.
 *
 * @author Eelco Hillenius
 * @author Jonathan Locke
 */
The only catch is that you specify the strategy application wide so
your strategy will be called for every component you create (not just
pages).
This is ofcourse not a big problem, just something i would like to see
changed (just in case you are reading this eelco ;))

2005/12/22, John Patterson <[EMAIL PROTECTED]>:
> Hi Wicketeers,
>
> I have a page which can only be viewed if the user is logged in.  If the user
> is not logged in then checkAccess() redirects to a sign in page and returns
> false.
>
> I moved my "page building" code to the onBeginRequest() method so that it is
> only called when it is really needed (ie not when the page cannot be viewed).
>
> However, in my original page doRender() is still called and the html is parsed
> etc.  This involves looking up data from the database which is never shown.
>
> Is there any way to build a page that will only be built if it is actually
> going to be displayed?
>
> Thanks,
>
> John.
>
>
> ---
> 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_id=7637&alloc_id=16865&op=click
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] After redirection doRender() still called

2005-12-25 Thread Eelco Hillenius
Also - more work, but ultimately the most flexible, is to provide your
own request target resolving. The checkAccess method is a convenience
method, but you can decide to put that kind of logic somewhere else
too. See IRequestCycleProcessor and work your way down from there.

Eelco


On 12/23/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> in 1.2 checkAccess() is not called in doRender any more but before it.
> But ofcourse the constructor is always called. If you don't want that then
> you need some kind of factory.
>
> What you could do is do the construction in the checkAccess() method but
> dont know if that is very nice way..
>
> johan
>
>
> On 12/22/05, John Patterson <[EMAIL PROTECTED]> wrote:
> > Hi Wicketeers,
> >
> > I have a page which can only be viewed if the user is logged in.  If the
> user
> > is not logged in then checkAccess() redirects to a sign in page and
> returns
> > false.
> >
> > I moved my "page building" code to the onBeginRequest() method so that it
> is
> > only called when it is really needed (ie not when the page cannot be
> viewed).
> >
> > However, in my original page doRender() is still called and the html is
> parsed
> > etc.  This involves looking up data from the database which is never
> shown.
> >
> > Is there any way to build a page that will only be built if it is actually
> > going to be displayed?
> >
> > Thanks,
> >
> > John.
> >
> >
> > ---
> > 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_id=7637&alloc_id=16865&op=click
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


---
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] After redirection doRender() still called

2005-12-22 Thread Johan Compagner
in 1.2 checkAccess() is not called in doRender any more but before it.But ofcourse the constructor is always called. If you don't want that then you need some kind of factory.What you could do is do the construction in the checkAccess() method but dont know if that is very nice way..
johanOn 12/22/05, John Patterson <[EMAIL PROTECTED]> wrote:
Hi Wicketeers,I have a page which can only be viewed if the user is logged in.  If the useris not logged in then checkAccess() redirects to a sign in page and returnsfalse.I moved my "page building" code to the onBeginRequest() method so that it is
only called when it is really needed (ie not when the page cannot be viewed).However, in my original page doRender() is still called and the html is parsedetc.  This involves looking up data from the database which is never shown.
Is there any way to build a page that will only be built if it is actuallygoing to be displayed?Thanks,John.---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 makessearching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] After redirection doRender() still called

2005-12-22 Thread Juergen Donnerstag
Bookmarkable pages are the only one that come into my mind.

Juergen

On 12/22/05, John Patterson <[EMAIL PROTECTED]> wrote:
> Hi Wicketeers,
>
> I have a page which can only be viewed if the user is logged in.  If the user
> is not logged in then checkAccess() redirects to a sign in page and returns
> false.
>
> I moved my "page building" code to the onBeginRequest() method so that it is
> only called when it is really needed (ie not when the page cannot be viewed).
>
> However, in my original page doRender() is still called and the html is parsed
> etc.  This involves looking up data from the database which is never shown.
>
> Is there any way to build a page that will only be built if it is actually
> going to be displayed?
>
> Thanks,
>
> John.
>
>
> ---
> 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_id=7637&alloc_id=16865&op=click
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] After redirection doRender() still called

2005-12-22 Thread John Patterson
Hi Wicketeers,

I have a page which can only be viewed if the user is logged in.  If the user 
is not logged in then checkAccess() redirects to a sign in page and returns 
false.

I moved my "page building" code to the onBeginRequest() method so that it is 
only called when it is really needed (ie not when the page cannot be viewed).

However, in my original page doRender() is still called and the html is parsed 
etc.  This involves looking up data from the database which is never shown.

Is there any way to build a page that will only be built if it is actually 
going to be displayed?

Thanks,

John.


---
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_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user