You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Brown, Berlin [GCG-PFS]" <Be...@Primerica.com> on 2010/06/24 14:50:58 UTC

Hierarchy mismatch with forms and hideable sections.

I am getting a hierarchy error message and the error makes sense, but
how do you construct a form that also has hideable sections:
 
This is what I had originally, a form and sub components.  This works
fine:
 
Java:
 
form = new Form();
panel.add(form);
 
form.add(new TextField("t1"))
form.add(new TextField("t2"))
 
Html:
 
<form>
  <input wicket:id="t1" />
  <input wicket:id="t2" />
</form>
 
The above pseudo code works fine.  Now I want to change to the following
(html):
 
Html:
 
<form>
  <input wicket:id="t1" />
  <div wicket:id="hideableSectionDisabledInitially">
    <input wicket:id="t2" />
  </div>
</form>
 
...
 
What would I change in the java code so that the code is disaled
initially, also such that the "t2" text field is part of the form
hierarchy (or at least I need to submit that with the form)?  
 
Berlin Brown
 

Re: Hierarchy mismatch with forms and hideable sections.

Posted by nino martinez wael <ni...@gmail.com>.
add a markupcontainer to match  hideableSectionDisabledInitial
>
> ly



2010/6/24 Brown, Berlin [GCG-PFS] <Be...@primerica.com>

> I am getting a hierarchy error message and the error makes sense, but
> how do you construct a form that also has hideable sections:
>
> This is what I had originally, a form and sub components.  This works
> fine:
>
> Java:
>
> form = new Form();
> panel.add(form);
>
> form.add(new TextField("t1"))
> form.add(new TextField("t2"))
>
> Html:
>
> <form>
>  <input wicket:id="t1" />
>  <input wicket:id="t2" />
> </form>
>
> The above pseudo code works fine.  Now I want to change to the following
> (html):
>
> Html:
>
> <form>
>  <input wicket:id="t1" />
>  <div wicket:id="hideableSectionDisabledInitially">
>    <input wicket:id="t2" />
>  </div>
> </form>
>
> ...
>
> What would I change in the java code so that the code is disaled
> initially, also such that the "t2" text field is part of the form
> hierarchy (or at least I need to submit that with the form)?
>
> Berlin Brown
>
>