Re: Wicket tests are extremely slow

2018-02-12 Thread James Selvakumar
Hi all,

Thank you very much for all the suggestions.
I agree that the slowness is because of Spring context initialized multiple
times.
Ours is a multi module maven application and what I have seen is the
context being initialized at least once per module because of new beans in
every module.
The ApplicationContextMock concept looks interesting and I shall try that
out.
Thanks again for taking your time to help me. Wicket rocks!

On Mon, Feb 12, 2018 at 6:17 PM Martijn Dashorst 
wrote:

> Probably you're initializing your application for each test, so you
> should look into speeding that up or eliminating it all together (just
> once for the whole suite)
>
> Martijn
>
>
> On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar 
> wrote:
> > Hi,
> >
> > We have a Wicket 7.x application which uses a Spring/Hibernate backend.
> We
> > have few hundred simple Wicket tests that basically tests whether the
> page
> > has been loaded properly. Since almost all our Wicket pages use Spring
> > beans, we have to initialize the Spring application context for our
> Wicket
> > tests to run. And as a result our tests are extremely slow that we have
> > stopped running them in our main pipeline.
> >
> > What strategy do you all follow to run Wicket tests that can run fast?
> >
> > Thanks in advance,
> > James
> > mCruncher
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


How to mount 404 page with Wicket and Servlet 3.0?

2018-02-12 Thread Kamil Paśko

Hi,

*Background:*

I'm trying to mount 404 page to my Wicket project.

I found confluence page wchich explains how to do it using web.xml 
(https://cwiki.apache.org/confluence/display/WICKET/Error+Pages+and+Feedback+Messages#ErrorPagesandFeedbackMessages-HTTPErrorPages) 
but my application uses Wicket-SpringBoot 
(https://github.com/MarcGiffing/wicket-spring-boot), so instead of 
web.xml there is Servlet 3.0 configuration somewhere.


*Question:*

Does anybody have an idea how to mount 404 page using Wicket + 
Wicket-SpringBoot + Servlet 3.0?



Thank you in advance,

Kamil




Re: Problem with TabbedPanel / setResponePage refreshing

2018-02-12 Thread Jarosław Ciarkowski

Hello,
I guess my last mail was to complex so I'll try to simplify it:

Why children's "onRemove" method is not called when "setResponsePage" is 
called?
As I've written previously - manually invoking "page.removeAll()" works 
but shouldn't it be called automatically?


Jarek


On 09.02.2018 11:49, Jarosław Ciarkowski wrote:

Hello,

I have one question regarding refreshing page with TabbedPanel and 
refreshing page with setResponsePage method.


In my application I had AjaxTabbedPanels. I needed to show 
confirmation window on tab change though.
I've already had it on "window.onbeforeunload", so I changed 
AjaxTabbedPanels to TabbedPanels - which refreshes page on tab change.


The next thing was to do the same thing on button click. It works fine 
with setResponsePage but...


I have 2 actions which need to be called - one on page's child removal 
and the second one on page refresh.


Right now I call them on child's "onRemove" method and page's 
"onInitialize" method.


The problem is - when I change tab in TabbedPanel "onRemove" is called 
but "onInitialize" isn't.
When I call setResponsePage (to the same page) it's the other way 
around - "onInitialaze" is called but not "onRemove".


I've got over it with manual call "page.removeAll()" right before 
setResponsePage, but it solves only half of the problem and for me it 
looks like a wrong solution.


Is there any way to "catch" in the page class that it was refreshed by 
the TabbedPanel? Is there better way to call "onRemove" with 
setResponsePage than "page.removeAll()"? Or maybe there is a better 
way to refresh a page than setResponsePage?


I would be glad to receive some help.

Thanks,
Jarek




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



Re: Wicket tests are extremely slow

2018-02-12 Thread Martijn Dashorst
Probably you're initializing your application for each test, so you
should look into speeding that up or eliminating it all together (just
once for the whole suite)

Martijn


On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar  wrote:
> Hi,
>
> We have a Wicket 7.x application which uses a Spring/Hibernate backend. We
> have few hundred simple Wicket tests that basically tests whether the page
> has been loaded properly. Since almost all our Wicket pages use Spring
> beans, we have to initialize the Spring application context for our Wicket
> tests to run. And as a result our tests are extremely slow that we have
> stopped running them in our main pipeline.
>
> What strategy do you all follow to run Wicket tests that can run fast?
>
> Thanks in advance,
> James
> mCruncher



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

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