You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2016/06/05 20:45:09 UTC

Problem migrating to Wicket 7

Hello Martin,
after migrating our Wicket application from Wicket 6.22 to Wicket 7.3, 
we've noticed, that some Behavior's renderHead method is not called 
anymore. Which means, HeaderItems added to the Response object for 
rendering ResourceReferences and OnDomReady JavaScripts statements are 
not rendered anymore. I have to admit, that our application uses a 
similiar approach to render a consisten page layout like described here 
(https://cwiki.apache.org/confluence/display/WICKET/Consistent+page+layout+using+borders). 
Our components are added to the BorderBodyContainer of a "Layout" Border 
class. I was able to figure out, that the 
ChildFirstHeaderRenderStrategy#renderChildHeaders methods never calls 
component.internalRenderHead(headerContainer) and I'm wondering why. Did 
you have changed something regarding how WebMarkupContainers esp. 
Borders and their associated Behaviors are rendered? Do you have a hint, 
where to focus my investigation?
Thank you very much.
Regards,
    Dirk Forchel

PS: Before creating a quickstart and open an issue I'd like to figure it 
out on myself

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


Re: Problem migrating to Wicket 7

Posted by Dirk Forchel <di...@exedio.com>.
Hello Martin,
As I've written in my first post, we've noticed a general problem with all
Behavior classes added to Components where the parent component is a Border
component. We are using two nested Borders to create a consistent page
layout for our web application. The "content" components are added to the
2nd BorderBodyContainer. For all Behaviors added to these Components the
"renderHead" method is never called. At the end, all resource references and
all Javascript statements are not rendered anymore.
To simplify this, I've created a quickstart application with a component
hierarchy similiar to our approach (a "layout container", a Border class,
with another Border as layout inside). In addition to the HomePage I've
mounted two test pages with a simple Slider component, one (TestPage.class,
http://localhost:8080/test1.html) with the SlideshowPanel added to a
Border's BodyContainer (this works with Wicket 6 and Wicket 7) and another
page (TestPage2.class, http://localhost:8080/test2.html)) with the same
SlideshowPanel added to our "layout" solution. On this page, the
"renderHead" method of the NMSlideshowBehavior (which is the Behavior added
to the SlideshowPanel) is never called and therefore, the JavaScript library
(JavaScriptHeaderItem with a ResourceReference) and the JavaScript statement
(OnDomReadyHederItem for script) itself get not rendered. I have no idea
why, this works with Wicket 6 but NOT with Wicket 7.
I was able to figure out, that the
ChildFirstHeaderRenderStrategy#renderChildHeaders method never calls
component.internalRenderHead(headerContainer) and I'm wondering why!? This
might be due to some changes made under the hood of Wicket 7.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674864.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Problem migrating to Wicket 7

Posted by Dirk Forchel <di...@exedio.com>.
Ciao Andrea,
it works! Great! I'll wait until the official release of Wicket 7.4
Dirk

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674963.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Problem migrating to Wicket 7

Posted by Andrea Del Bene <an...@gmail.com>.
Hi,

Dirk could you test your app with version 7.4.0-SNAPSHOT? This should 
solve your problem.

Thank you.

Andrea.

On 18/06/2016 11:03, Martin Grigorov wrote:
> https://issues.apache.org/jira/browse/WICKET-6185
>
> On Fri, Jun 17, 2016 at 8:46 PM, Martin Grigorov <ma...@gmail.com>
> wrote:
>
>> It is caused by a change for WICKET-5988
>>
>> Now the body container is not added to the Border but it relies solely on
>> component resolving.
>> The problem is that the resolving is not used when visiting the children
>>
>> Please file a ticket at JIRA!
>> Thanks!
>> On Jun 17, 2016 10:08 AM, "Martin Grigorov" <mg...@apache.org> wrote:
>>
>>> Hi,
>>>
>>> I'll take a look soon!
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>> On Thu, Jun 16, 2016 at 8:04 AM, Dirk Forchel <di...@exedio.com>
>>> wrote:
>>>
>>>> Hi Martin,
>>>> I've added a much more simpler test application to show what's not
>>>> working
>>>> (see myproject2.zip below).
>>>> On the first page you can see on the right side a TextComponent with a
>>>> simple Behavior added to a Page. This Behavior adds some
>>>> JavaScriptResourceReference (the jQuery function definition) and an
>>>> OnDomReadyHeaderItem (the jQuery function call) to the header. If it
>>>> works,
>>>> the value of the input field is replaced from "test" to "Hello Dude!" and
>>>> the input element is highlighted for a short moment.
>>>> On the second page you can find the same functionality but added to a
>>>> Border
>>>> component. This works as well as described.
>>>> On the third page I've added a TextComponent with the same Behavior but
>>>> to
>>>> the BorderBodyContainer (the content area) of our layout class (a Border
>>>> component) which is added to another Border (our layout container). On
>>>> this
>>>> page, the Behavior is NOT working with Wicket 7.3. But the same IS
>>>> working
>>>> with Wicket 6.23. You can easily switch between both versions by changing
>>>> the wicket.version in the pom.xml.
>>>> I've noticed during my investigation, that the "renderHead" method of the
>>>> Behavior class never gets called and I have not glue why! I could
>>>> imagine,
>>>> that one reason could be the fact, that we use two nested Border
>>>> components.
>>>> But the behavior should work with this combination as well, I think.
>>>> Could you please have a look at this problem.
>>>>
>>>> Here is the quickstart:  myproject2.zip
>>>> <http://apache-wicket.1842946.n4.nabble.com/file/n4674910/myproject2.zip
>>>> --
>>>> View this message in context:
>>>> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.html
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>


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


Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <ma...@gmail.com>.
https://issues.apache.org/jira/browse/WICKET-6185

On Fri, Jun 17, 2016 at 8:46 PM, Martin Grigorov <ma...@gmail.com>
wrote:

> It is caused by a change for WICKET-5988
>
> Now the body container is not added to the Border but it relies solely on
> component resolving.
> The problem is that the resolving is not used when visiting the children
>
> Please file a ticket at JIRA!
> Thanks!
> On Jun 17, 2016 10:08 AM, "Martin Grigorov" <mg...@apache.org> wrote:
>
>> Hi,
>>
>> I'll take a look soon!
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Jun 16, 2016 at 8:04 AM, Dirk Forchel <di...@exedio.com>
>> wrote:
>>
>>> Hi Martin,
>>> I've added a much more simpler test application to show what's not
>>> working
>>> (see myproject2.zip below).
>>> On the first page you can see on the right side a TextComponent with a
>>> simple Behavior added to a Page. This Behavior adds some
>>> JavaScriptResourceReference (the jQuery function definition) and an
>>> OnDomReadyHeaderItem (the jQuery function call) to the header. If it
>>> works,
>>> the value of the input field is replaced from "test" to "Hello Dude!" and
>>> the input element is highlighted for a short moment.
>>> On the second page you can find the same functionality but added to a
>>> Border
>>> component. This works as well as described.
>>> On the third page I've added a TextComponent with the same Behavior but
>>> to
>>> the BorderBodyContainer (the content area) of our layout class (a Border
>>> component) which is added to another Border (our layout container). On
>>> this
>>> page, the Behavior is NOT working with Wicket 7.3. But the same IS
>>> working
>>> with Wicket 6.23. You can easily switch between both versions by changing
>>> the wicket.version in the pom.xml.
>>> I've noticed during my investigation, that the "renderHead" method of the
>>> Behavior class never gets called and I have not glue why! I could
>>> imagine,
>>> that one reason could be the fact, that we use two nested Border
>>> components.
>>> But the behavior should work with this combination as well, I think.
>>> Could you please have a look at this problem.
>>>
>>> Here is the quickstart:  myproject2.zip
>>> <http://apache-wicket.1842946.n4.nabble.com/file/n4674910/myproject2.zip
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>

Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <ma...@gmail.com>.
It is caused by a change for WICKET-5988

Now the body container is not added to the Border but it relies solely on
component resolving.
The problem is that the resolving is not used when visiting the children

Please file a ticket at JIRA!
Thanks!
On Jun 17, 2016 10:08 AM, "Martin Grigorov" <mg...@apache.org> wrote:

> Hi,
>
> I'll take a look soon!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Jun 16, 2016 at 8:04 AM, Dirk Forchel <di...@exedio.com>
> wrote:
>
>> Hi Martin,
>> I've added a much more simpler test application to show what's not working
>> (see myproject2.zip below).
>> On the first page you can see on the right side a TextComponent with a
>> simple Behavior added to a Page. This Behavior adds some
>> JavaScriptResourceReference (the jQuery function definition) and an
>> OnDomReadyHeaderItem (the jQuery function call) to the header. If it
>> works,
>> the value of the input field is replaced from "test" to "Hello Dude!" and
>> the input element is highlighted for a short moment.
>> On the second page you can find the same functionality but added to a
>> Border
>> component. This works as well as described.
>> On the third page I've added a TextComponent with the same Behavior but to
>> the BorderBodyContainer (the content area) of our layout class (a Border
>> component) which is added to another Border (our layout container). On
>> this
>> page, the Behavior is NOT working with Wicket 7.3. But the same IS working
>> with Wicket 6.23. You can easily switch between both versions by changing
>> the wicket.version in the pom.xml.
>> I've noticed during my investigation, that the "renderHead" method of the
>> Behavior class never gets called and I have not glue why! I could imagine,
>> that one reason could be the fact, that we use two nested Border
>> components.
>> But the behavior should work with this combination as well, I think.
>> Could you please have a look at this problem.
>>
>> Here is the quickstart:  myproject2.zip
>> <http://apache-wicket.1842946.n4.nabble.com/file/n4674910/myproject2.zip>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I'll take a look soon!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Jun 16, 2016 at 8:04 AM, Dirk Forchel <di...@exedio.com>
wrote:

> Hi Martin,
> I've added a much more simpler test application to show what's not working
> (see myproject2.zip below).
> On the first page you can see on the right side a TextComponent with a
> simple Behavior added to a Page. This Behavior adds some
> JavaScriptResourceReference (the jQuery function definition) and an
> OnDomReadyHeaderItem (the jQuery function call) to the header. If it works,
> the value of the input field is replaced from "test" to "Hello Dude!" and
> the input element is highlighted for a short moment.
> On the second page you can find the same functionality but added to a
> Border
> component. This works as well as described.
> On the third page I've added a TextComponent with the same Behavior but to
> the BorderBodyContainer (the content area) of our layout class (a Border
> component) which is added to another Border (our layout container). On this
> page, the Behavior is NOT working with Wicket 7.3. But the same IS working
> with Wicket 6.23. You can easily switch between both versions by changing
> the wicket.version in the pom.xml.
> I've noticed during my investigation, that the "renderHead" method of the
> Behavior class never gets called and I have not glue why! I could imagine,
> that one reason could be the fact, that we use two nested Border
> components.
> But the behavior should work with this combination as well, I think.
> Could you please have a look at this problem.
>
> Here is the quickstart:  myproject2.zip
> <http://apache-wicket.1842946.n4.nabble.com/file/n4674910/myproject2.zip>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Problem migrating to Wicket 7

Posted by Dirk Forchel <di...@exedio.com>.
Hi Martin,
I've added a much more simpler test application to show what's not working
(see myproject2.zip below).
On the first page you can see on the right side a TextComponent with a
simple Behavior added to a Page. This Behavior adds some
JavaScriptResourceReference (the jQuery function definition) and an
OnDomReadyHeaderItem (the jQuery function call) to the header. If it works,
the value of the input field is replaced from "test" to "Hello Dude!" and
the input element is highlighted for a short moment.
On the second page you can find the same functionality but added to a Border
component. This works as well as described.
On the third page I've added a TextComponent with the same Behavior but to
the BorderBodyContainer (the content area) of our layout class (a Border
component) which is added to another Border (our layout container). On this
page, the Behavior is NOT working with Wicket 7.3. But the same IS working
with Wicket 6.23. You can easily switch between both versions by changing
the wicket.version in the pom.xml.
I've noticed during my investigation, that the "renderHead" method of the
Behavior class never gets called and I have not glue why! I could imagine,
that one reason could be the fact, that we use two nested Border components.
But the behavior should work with this combination as well, I think.
Could you please have a look at this problem.

Here is the quickstart:  myproject2.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4674910/myproject2.zip>  

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <mg...@apache.org>.
What exactly are the steps to reproduce ?
The application doesn't explain anything! Your email as well!

I hope you don't expect from us to start debugging all those classes
without an idea what they are supposed to do.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 8, 2016 at 1:12 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Your first email delivered to users@ differ with the one I read now in
> Nabble.
> I don't know why.
>
> In your third email I see a link to the demo app.
> I'll try to take a look in my spare time!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jun 8, 2016 at 12:30 PM, Dirk Forchel <di...@exedio.com>
> wrote:
>
>> Nabble does. Here it is again ...  myproject.zip
>> <http://apache-wicket.1842946.n4.nabble.com/file/n4674857/myproject.zip>
>>
>> PS: By the way, I meant the attachment at my previous post.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674857.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <mg...@apache.org>.
Your first email delivered to users@ differ with the one I read now in
Nabble.
I don't know why.

In your third email I see a link to the demo app.
I'll try to take a look in my spare time!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 8, 2016 at 12:30 PM, Dirk Forchel <di...@exedio.com>
wrote:

> Nabble does. Here it is again ...  myproject.zip
> <http://apache-wicket.1842946.n4.nabble.com/file/n4674857/myproject.zip>
>
> PS: By the way, I meant the attachment at my previous post.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674857.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Problem migrating to Wicket 7

Posted by Dirk Forchel <di...@exedio.com>.
Nabble does. Here it is again ...  myproject.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4674857/myproject.zip>  

PS: By the way, I meant the attachment at my previous post.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674857.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Problem migrating to Wicket 7

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

There is no attachment.
I guess Nabble doesn't allow it.
On Jun 8, 2016 8:18 AM, "Dirk Forchel" <di...@exedio.com> wrote:

> Does nobody has an idea? There might be some changes between Wicket 6 and
> Wicket 7 how HeaderItems are rendered for Behaviors attached to Components.
> I guess, that the problem are the two nested Border components. But I don't
> feel confident. As stated above, I've attached a quickstart application
> inorder to reproduce the problem.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674846.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Problem migrating to Wicket 7

Posted by Dirk Forchel <di...@exedio.com>.
Does nobody has an idea? There might be some changes between Wicket 6 and
Wicket 7 how HeaderItems are rendered for Behaviors attached to Components.
I guess, that the problem are the two nested Border components. But I don't
feel confident. As stated above, I've attached a quickstart application
inorder to reproduce the problem.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674846.html
Sent from the Users forum mailing list archive at Nabble.com.

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