Does wicket have parameter-based security?

2014-03-28 Thread Tom Norton
Let's say I have a page called: /order-details/${orderId}.

Let's also say I want to ensure that some customer named Bob can only see
the order-details pages for the orders he placed, but not any of the
order-details pages for orders that John placed.

I already know wicket has role-based security.  Does wicket also have some
form of parameter-based security?  Am I barking up the wrong tree?  Should
this security check be inside a hibernate on-load event listener instead?

Thanks,
Tom


Re: http://wicketinaction.com/ not reachable

2014-03-28 Thread Martijn Dashorst
The wicket in action blog has been suspended due to the insurmountable
hacks that happen on the wordpress installation. This time the blog was
serving cracks.

It will remain offline until I have time to convert the blogging engine to
a static website based on jekyll. Unfortunately I am unable to show a
proper error page explaining what happened.

The wayback machine has the content-you can see the original articles there.

Martijn



On Thu, Mar 27, 2014 at 3:05 PM, Sebastien  wrote:

> Not a registration issue at least (Registration Expiration Date: 2015-01-10
> 00:00:00)
>
>
>
> On Thu, Mar 27, 2014 at 3:00 PM, Sebastien  wrote:
>
> > Same from France. Did you renew the domain name ? :S
> >
> >
> > On Thu, Mar 27, 2014 at 2:56 PM, Richter, Marvin <
> > marvin.rich...@jestadigital.com> wrote:
> >
> >> I get the same message from the Hoster (Germany)
> >>
> >>
> >> -Original Message-
> >> From: grsm...@atlanticbb.net [mailto:grsm...@atlanticbb.net]
> >> Sent: Thursday, March 27, 2014 2:49 PM
> >> To: users@wicket.apache.org
> >> Subject: Re: http://wicketinaction.com/ not reachable
> >>
> >> I can get to in. Am in the United States.
> >> George
> >>
> >> -Original Message-
> >> From: Bert
> >> Sent: Thursday, March 27, 2014 8:44 AM
> >> To: users
> >> Subject: http://wicketinaction.com/ not reachable
> >>
> >> Hallo wicketeers,
> >>
> >> I can not currently reach the blog http://wicketinaction.com/
> >>
> >> I get an error from the hoster bhosted.nl:
> >>
> >> De bHosted.nl server is benaderd met een domein dat niet bekend is op
> >> deze server. Om veiligheidsredenen wordt deze pagina ook getoond indien
> >> deze server benaderd wordt met alleen een IP adres.
> >>
> >>
> >> Is this just me?
> >>
> >> Bert
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com


JBoss Forge Plugin

2014-03-28 Thread David Beer
Hi All

I am thinking of creating a JBoss Forge Plugin for wicket. The idea being
that it would help create a  base project with the Filter set the Home Page
and a Base Page to work from. It would also provide the ability to create a
new Page which would include creating Java source and HTML, the same would
also be done for creating a panel and other commonly used parts.

What do people think? Any suggestions on Features.

Thanks

David


Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Robin Shine
Hi Sven,


An issue has been created for this with a quickstart:
https://issues.apache.org/jira/browse/WICKET-5546

 
Regards
Robin




 From: Sven Meier 
To: users@wicket.apache.org 
Sent: Friday, March 28, 2014 4:22 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
 

Hi Robin,

we should try to improve that. Please create a new issue with a quickstart.

Thanks
Sven


On 03/28/2014 09:16 AM, Robin Shine wrote:
> Hi Sven,
>
> Thanks for looking into this. I started a new wicket project from scratch 
> using Wicket maven archetype, and it does work as expected! Then I checked 
> into my project to find the difference, and tt turns out that this issue will 
> occur as long as below code is added in wicket WebApplication.init():
>
>
>          getComponentInstantiationListeners().add(new 
>IComponentInstantiationListener() {
>              
>              @Override
>              public void onInstantiation(Component component) {
>                  component.add(new Behavior() {
>
>                  });
>              }
>              
>          });
>
> It seems that the instantiation listener adds the behavior to the page at 
> very start of the page constructor, and then the page is marked as dirty to 
> cause onInitialize() being called afterwards. Is this a bug or expected 
> behavior?
>
>
> Regards
> Robin
>
>
>
> 
>   From: Sven Meier 
> To: users@wicket.apache.org
> Sent: Thursday, March 27, 2014 10:49 PM
> Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
> exception
>  
>
> Hi,
>
> #onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.
>
> Regards
> Sven
>
>
> On 03/27/2014 03:30 PM, Robin Shine wrote:
>> Hi All,
>>
>> We are glad to see that the issue WICKET-5387 (Page#onInitialize called 
>> after an exception in the constructor of Page) has been resolved in 6.13.0. 
>> However when I tried this version (and 6.14.0) with below code, the issue 
>> still exist:
>>
>> public class TestPage extends WebPage {
>>
>>        public TestPage() {
>>            throw new RuntimeException("exception");
>>        }
>>
>>        @Override
>>        protected void onInitialize() {
>>            super.onInitialize();
>>            
>>            System.out.println("onInitialize");
>>        }
>>        
>> }
>>
>> As you can see from above code, I intentionally throws an exception in 
>> TestPage constructor and hoping that onInitialize() method is not called 
>> when I visit that page. But the result is that "onInitialize" is still 
>> getting called in this case. Am I understanding WICKET-5387 incorrectly? And 
>> is there any approach to prevent onInitialize() from being called in case of 
>> a constructor exception? We want this as onInitialize() might rely on some 
>> params setup in the constructor, and calling onInitialize() will lead to 
>> other exceptions hiding exceptions thrown in constructor.
>>
>> Regards
>>
>> Robin
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


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

Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Sven Meier

Hi Robin,

we should try to improve that. Please create a new issue with a quickstart.

Thanks
Sven


On 03/28/2014 09:16 AM, Robin Shine wrote:

Hi Sven,

Thanks for looking into this. I started a new wicket project from scratch using 
Wicket maven archetype, and it does work as expected! Then I checked into my 
project to find the difference, and tt turns out that this issue will occur as 
long as below code is added in wicket WebApplication.init():


 getComponentInstantiationListeners().add(new 
IComponentInstantiationListener() {
 
 @Override

 public void onInstantiation(Component component) {
 component.add(new Behavior() {

 });
 }
 
 });


It seems that the instantiation listener adds the behavior to the page at very 
start of the page constructor, and then the page is marked as dirty to cause 
onInitialize() being called afterwards. Is this a bug or expected behavior?


Regards
Robin




  From: Sven Meier 
To: users@wicket.apache.org
Sent: Thursday, March 27, 2014 10:49 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
  


Hi,

#onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

Regards
Sven


On 03/27/2014 03:30 PM, Robin Shine wrote:

Hi All,

We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
an exception in the constructor of Page) has been resolved in 6.13.0. However 
when I tried this version (and 6.14.0) with below code, the issue still exist:

public class TestPage extends WebPage {

   public TestPage() {
   throw new RuntimeException("exception");
   }

   @Override
   protected void onInitialize() {
   super.onInitialize();
   
   System.out.println("onInitialize");

   }
   
}


As you can see from above code, I intentionally throws an exception in TestPage 
constructor and hoping that onInitialize() method is not called when I visit that page. 
But the result is that "onInitialize" is still getting called in this case. Am 
I understanding WICKET-5387 incorrectly? And is there any approach to prevent 
onInitialize() from being called in case of a constructor exception? We want this as 
onInitialize() might rely on some params setup in the constructor, and calling 
onInitialize() will lead to other exceptions hiding exceptions thrown in constructor.

Regards

Robin



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



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



Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Robin Shine
Hi Sven,

Thanks for looking into this. I started a new wicket project from scratch using 
Wicket maven archetype, and it does work as expected! Then I checked into my 
project to find the difference, and tt turns out that this issue will occur as 
long as below code is added in wicket WebApplication.init():


        getComponentInstantiationListeners().add(new 
IComponentInstantiationListener() {
            
            @Override
            public void onInstantiation(Component component) {
                component.add(new Behavior() {

                });
            }
            
        });

It seems that the instantiation listener adds the behavior to the page at very 
start of the page constructor, and then the page is marked as dirty to cause 
onInitialize() being called afterwards. Is this a bug or expected behavior?


Regards
Robin




 From: Sven Meier 
To: users@wicket.apache.org 
Sent: Thursday, March 27, 2014 10:49 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
 

Hi,

#onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

Regards
Sven


On 03/27/2014 03:30 PM, Robin Shine wrote:
> Hi All,
>
> We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
> an exception in the constructor of Page) has been resolved in 6.13.0. However 
> when I tried this version (and 6.14.0) with below code, the issue still exist:
>
> public class TestPage extends WebPage {
>
>      public TestPage() {
>          throw new RuntimeException("exception");
>      }
>
>      @Override
>      protected void onInitialize() {
>          super.onInitialize();
>          
>          System.out.println("onInitialize");
>      }
>      
> }
>
> As you can see from above code, I intentionally throws an exception in 
> TestPage constructor and hoping that onInitialize() method is not called when 
> I visit that page. But the result is that "onInitialize" is still getting 
> called in this case. Am I understanding WICKET-5387 incorrectly? And is there 
> any approach to prevent onInitialize() from being called in case of a 
> constructor exception? We want this as onInitialize() might rely on some 
> params setup in the constructor, and calling onInitialize() will lead to 
> other exceptions hiding exceptions thrown in constructor.
>
> Regards
>
> Robin
>


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