You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Will Jackson <ja...@yahoo.com> on 2007/11/06 15:45:21 UTC

default and prevent access for base page

What is the proper way to declare a default <wicket:child /> and ensure that the page containing the <wicket:child /> is not directly accessible on its own? 

I know I can just call the extending page (i.e. Page1 extends BasePage, calling Page1.html), but how do I ensure that BasePage.html is not directly accessible? When I call the page in the browser it just shows a blank region where the page extension will appear. What I really want is possibly a 404 response.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: default and prevent access for base page

Posted by Will Jackson <ja...@yahoo.com>.
Even better... tried it out and when attempting to
access the abstract home page I get a 404 (as desired)

Thanks Al!

--- Al Maw <wi...@almaw.com> wrote:

> Johan Compagner wrote:
> >>
> >> Make BasePage an abstract class.
> > 
> > some things in live are soo simple :)
> > (are we testing for abstract pages or will there
> just be an exception?)
> 
> Probably the latter, but if your users are guessing
> URLs then they 
> deserve to lose.
> 
> Regards,
> 
> Al
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@wicket.apache.org
> For additional commands, e-mail:
> users-help@wicket.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: default and prevent access for base page

Posted by Al Maw <wi...@almaw.com>.
Johan Compagner wrote:
>>
>> Make BasePage an abstract class.
> 
> some things in live are soo simple :)
> (are we testing for abstract pages or will there just be an exception?)

Probably the latter, but if your users are guessing URLs then they 
deserve to lose.

Regards,

Al

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: default and prevent access for base page

Posted by Johan Compagner <jc...@gmail.com>.
>
>
> Make BasePage an abstract class.


some things in live are soo simple :)
(are we testing for abstract pages or will there just be an exception?)

johan

Re: default and prevent access for base page

Posted by Al Maw <wi...@almaw.com>.
Will Jackson wrote:
> What is the proper way to declare a default <wicket:child /> and
> ensure that the page containing the <wicket:child /> is not directly
> accessible on its own?
> 
> I know I can just call the extending page (i.e. Page1 extends
> BasePage, calling Page1.html), but how do I ensure that BasePage.html
> is not directly accessible? When I call the page in the browser it
> just shows a blank region where the page extension will appear. What
> I really want is possibly a 404 response.

Make BasePage an abstract class.

Regards,

Al

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org