You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ravi <ra...@intellinet.de> on 2016/06/02 08:32:19 UTC

wicket:head and ajax updates

Hi all,

I have following problem:
I have a panel with a wicket:head tag that contributes the <title> to a
page. The title is a simple Label.
Now the first time it renders without a problem. 
When I navigate in my form, it sends an event that the title-label listens
to and adds itself to the target.
But in the HTML it never gets refreshed. Although I can see it in the
response with the updated value.

Also the same mechanism worked before when I had it on the page itself and
put it directly in the <head> section.

any ideas what I missed?

Kind regards,

Ravi

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827.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: wicket:head and ajax updates

Posted by Ravi <ra...@intellinet.de>.
One difference I see in the response is that in my application the <title> is
contained in the <header-contribution> element (not working). Whereas in my
quickstart it is in the in an <component> element (working) as such:

Quickstart:
<code>
<?xml version="1.0" encoding="UTF-8"?>
<ajax-response>
<component id="browserTitlee" ></component></ajax-response>
<code>

My application:
<code>
<header-contribution></header-contribution>
</code>

any idea where I can start debugging or how to avoid this?
I also added an Ajaxlink in my application that send an event to my
Title-label and this works too!

I can not make out the where the difference lies, since the browserTitle
listens only to an event.

Any idea how to avoid this, or where I could start debugging?

Ravi

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827p4674834.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: wicket:head and ajax updates

Posted by Ravi <ra...@intellinet.de>.
Okay, my quickstart works as expected.
So the problem must be somewhere else in my code...

Thank you all for your quick response!

Ravi

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827p4674833.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: wicket:head and ajax updates

Posted by Ravi <ra...@intellinet.de>.
Francois Meillet wrote
> Hi Ravi,
> 
> a stupid question : are you sure the updated value is different from the
> original value ?
> 
> François 

Yes :)
I try to make a quikstart.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827p4674832.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: wicket:head and ajax updates

Posted by Francois Meillet <fr...@gmail.com>.
Hi Ravi,

a stupid question : are you sure the updated value is different from the original value ?

François 








> Le 2 juin 2016 à 11:07, Ravi <ra...@intellinet.de> a écrit :
> 
> @Ernesto
> I added the version to my post.
> 
> @Martin
> It is present in the Ajax response as well as in the page markup.
> The page renders correctly the first time. Only the Ajax update does not
> occur in the head.
> I'll try to strip it down somewhat.
> 
> Usually I don't use wicket:head. So I wasn't sure if I'm missing something.
> 
> You have a point there martin, but since this is a base component for
> multiple applications, we try to keep the applications itself as lean as
> possible.
> 
> Ravi
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827p4674830.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: wicket:head and ajax updates

Posted by Ravi <ra...@intellinet.de>.
@Ernesto
I added the version to my post.

@Martin
It is present in the Ajax response as well as in the page markup.
The page renders correctly the first time. Only the Ajax update does not
occur in the head.
I'll try to strip it down somewhat.

Usually I don't use wicket:head. So I wasn't sure if I'm missing something.

You have a point there martin, but since this is a base component for
multiple applications, we try to keep the applications itself as lean as
possible.

Ravi


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827p4674830.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: wicket:head and ajax updates

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

In the Ajax response there must be something like: <component
id="theTitleMarkupId"> and in your page html there must be <title
id="theTitleMarkupId".
If both of those are true then I don't see why it won't work.

But I personally won't put any components inside <wicket:head>.
What if two or more Panels contribute <title> in their <wicket:head> ?

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

On Thu, Jun 2, 2016 at 10:32 AM, Ravi <ra...@intellinet.de> wrote:

> Hi all,
>
> I have following problem:
> I have a panel with a wicket:head tag that contributes the <title> to a
> page. The title is a simple Label.
> Now the first time it renders without a problem.
> When I navigate in my form, it sends an event that the title-label listens
> to and adds itself to the target.
> But in the HTML it never gets refreshed. Although I can see it in the
> response with the updated value.
>
> Also the same mechanism worked before when I had it on the page itself and
> put it directly in the <head> section.
>
> any ideas what I missed?
>
> Kind regards,
>
> Ravi
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827.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: wicket:head and ajax updates

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
you don't even say which version of wicked are you using :-)

On Thu, Jun 2, 2016 at 10:32 AM, Ravi <ra...@intellinet.de> wrote:

> Hi all,
>
> I have following problem:
> I have a panel with a wicket:head tag that contributes the <title> to a
> page. The title is a simple Label.
> Now the first time it renders without a problem.
> When I navigate in my form, it sends an event that the title-label listens
> to and adds itself to the target.
> But in the HTML it never gets refreshed. Although I can see it in the
> response with the updated value.
>
> Also the same mechanism worked before when I had it on the page itself and
> put it directly in the <head> section.
>
> any ideas what I missed?
>
> Kind regards,
>
> Ravi
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-head-and-ajax-updates-tp4674827.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro