You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Olivier Dutrieux <ol...@pasteur.fr> on 2016/12/23 00:05:57 UTC

FormComponentPanel with tag

I discover that if I do :



And I attach this composantForm to <input type="text"/>


When wicket render the page I obtain :

   
 * I'm surprisely that's a work : I thought for FormComponentPanel.class
it's necessary to have a tag like <div></div> (with open and close tag) : it
is normal ?

 * when I update the afterFieldComponent (FormComponentPanel) by ajax
(AjaxRequestTarget) the label (<p></p>) is add (not replace) on the dom each
time a update the afterFieldComponent : I think it's a bug
 
 Best regarde
 
 Duto

-----
Duto
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/FormComponentPanel-with-input-type-test-tag-tp4676516.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: FormComponentPanel with tag

Posted by Olivier Dutrieux <ol...@pasteur.fr>.
Hi Martin,

Sorry for the problem with the visibility of the code on email :s

And you are all rights wicket generate <div><input><p>...</p></input></div>
not <div><input/><p>...</p></div> : sorry I don't check the raw generated
html.

Thx for reply.

Duto

-----
Duto
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/FormComponentPanel-with-input-type-test-tag-tp4676516p4676520.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: FormComponentPanel with tag

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

It is a bit hard to comment your code because it is not in the email that
reaches the mailing list. We can see it only when we open the Nabble link
at the bottom.

1) Your markup is wrong.
<input> is leaf node, i.e. it cannot have children elements, but you are
trying to produce:
<input ...><p>...</p></input>

2) are you sure that Wicket generates <div><input/><p>..</p></div> ?
I think Wicket would generate what you have told it:
<div><input><p>...</p></input></div>, but the browser realizes that this is
invalid HTML and restructures it
Check the raw generated HTML, not the one in the Dev Tools > Elements tab.

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

On Fri, Dec 23, 2016 at 1:05 AM, Olivier Dutrieux <
olivier.dutrieux@pasteur.fr> wrote:

> I discover that if I do :
>
>
>
> And I attach this composantForm to <input type="text"/>
>
>
> When wicket render the page I obtain :
>
>
>  * I'm surprisely that's a work : I thought for FormComponentPanel.class
> it's necessary to have a tag like <div></div> (with open and close tag) :
> it
> is normal ?
>
>  * when I update the afterFieldComponent (FormComponentPanel) by ajax
> (AjaxRequestTarget) the label (<p></p>) is add (not replace) on the dom
> each
> time a update the afterFieldComponent : I think it's a bug
>
>  Best regarde
>
>  Duto
>
> -----
> Duto
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/
> FormComponentPanel-with-input-type-test-tag-tp4676516.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
>
>