You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andrew Berman <at...@gmail.com> on 2008/10/31 01:46:23 UTC

Issue with nested forms

Hello,

I am using Wicket 1.3.5 and I created a panel which contains a form. I have
a parent template page and a child of the parent page, both of which contain
an instance of the panel.  However, even if I give the panels two different
ids, I get an error like:

The component [MarkupContainer [Component id = emailLabel]] has the
same wicket:id as another component already added at the same level

Why is this happening since I am putting them in a different part of
the hierarchy?

Thanks,

Andrew

Re: Issue with nested forms

Posted by Andrew Berman <at...@gmail.com>.
Nevermind, error on my part.


On Mon, Nov 3, 2008 at 5:20 PM, Andrew Berman <at...@gmail.com> wrote:

> So even if I do this, all child pages need to add their components to the
> body and not the direct page itself which to me doesn't seem right.  Is
> there a way to get around this or is there a better way to add a dynamic
> class to the body tag?
>
>
> On Fri, Oct 31, 2008 at 2:54 PM, Andrew Berman <at...@gmail.com> wrote:
>
>> Awesome, thanks Igor!
>>
>>
>> On Fri, Oct 31, 2008 at 2:59 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>>
>>> put the container back, override its istransparentresolver() and return
>>> true
>>>
>>> -igor
>>>
>>> On Fri, Oct 31, 2008 at 2:50 PM, Andrew Berman <at...@gmail.com>
>>> wrote:
>>> > Actually, i had something more like this:
>>> >
>>> > <body wicket:id="body">
>>> >  <form wicket:id="form">...</form>
>>> >  <wicket:child/>
>>> > </body>
>>> >
>>> > And in the child:
>>> >
>>> > <form wicket:id="form"></form>
>>> >
>>> > When I removed the WebMarkupContainer on the body tag, everything
>>> worked
>>> > perfectly.
>>> >
>>> > On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com>
>>> wrote:
>>> >
>>> >> I figured out why it was happening.  It was because I put a
>>> >> WebMarkupContainer on the body tag which includes the wicket:child.
>>> So I
>>> >> had:
>>> >>
>>> >> <body wicket:id="body">
>>> >> <wicket:child/>
>>> >> </body>
>>> >>
>>> >> I need to be able to dynamically update the class attribute on the
>>> body tag
>>> >> which exists in the parent page, how can I do this since the way I
>>> want to
>>> >> do it doesn't work?
>>> >>
>>> >>
>>> >> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael
>>> <
>>> >> nino.martinez@jayway.dk> wrote:
>>> >>
>>> >>> Really strange... I have something similar on 1.4, although never
>>> more
>>> >>> that 1 nested form.
>>> >>>
>>> >>> Could you show us some code and markup cut out?
>>> >>>
>>> >>>
>>> >>> Andrew Berman wrote:
>>> >>>
>>> >>>> Hello,
>>> >>>>
>>> >>>> I am using Wicket 1.3.5 and I created a panel which contains a form.
>>> I
>>> >>>> have
>>> >>>> a parent template page and a child of the parent page, both of which
>>> >>>> contain
>>> >>>> an instance of the panel.  However, even if I give the panels two
>>> >>>> different
>>> >>>> ids, I get an error like:
>>> >>>>
>>> >>>> The component [MarkupContainer [Component id = emailLabel]] has the
>>> >>>> same wicket:id as another component already added at the same level
>>> >>>>
>>> >>>> Why is this happening since I am putting them in a different part of
>>> >>>> the hierarchy?
>>> >>>>
>>> >>>> Thanks,
>>> >>>>
>>> >>>> Andrew
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>
>>> >>> --
>>> >>> -Wicket for love
>>> >>>
>>> >>> Nino Martinez Wael
>>> >>> Java Specialist @ Jayway DK
>>> >>> http://www.jayway.dk
>>> >>> +45 2936 7684
>>> >>>
>>> >>>
>>> >>>
>>> >>> ---------------------------------------------------------------------
>>> >>> 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: Issue with nested forms

Posted by Igor Vaynberg <ig...@gmail.com>.
the whole point of a transparent container is that they are
transparent, so your subclasses can add items directly to the page.

-igor

On Mon, Nov 3, 2008 at 6:20 PM, Andrew Berman <at...@gmail.com> wrote:
> So even if I do this, all child pages need to add their components to the
> body and not the direct page itself which to me doesn't seem right.  Is
> there a way to get around this or is there a better way to add a dynamic
> class to the body tag?
>
> On Fri, Oct 31, 2008 at 2:54 PM, Andrew Berman <at...@gmail.com> wrote:
>
>> Awesome, thanks Igor!
>>
>>
>> On Fri, Oct 31, 2008 at 2:59 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>>
>>> put the container back, override its istransparentresolver() and return
>>> true
>>>
>>> -igor
>>>
>>> On Fri, Oct 31, 2008 at 2:50 PM, Andrew Berman <at...@gmail.com>
>>> wrote:
>>> > Actually, i had something more like this:
>>> >
>>> > <body wicket:id="body">
>>> >  <form wicket:id="form">...</form>
>>> >  <wicket:child/>
>>> > </body>
>>> >
>>> > And in the child:
>>> >
>>> > <form wicket:id="form"></form>
>>> >
>>> > When I removed the WebMarkupContainer on the body tag, everything worked
>>> > perfectly.
>>> >
>>> > On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com>
>>> wrote:
>>> >
>>> >> I figured out why it was happening.  It was because I put a
>>> >> WebMarkupContainer on the body tag which includes the wicket:child.
>>> So I
>>> >> had:
>>> >>
>>> >> <body wicket:id="body">
>>> >> <wicket:child/>
>>> >> </body>
>>> >>
>>> >> I need to be able to dynamically update the class attribute on the body
>>> tag
>>> >> which exists in the parent page, how can I do this since the way I want
>>> to
>>> >> do it doesn't work?
>>> >>
>>> >>
>>> >> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael
>>> <
>>> >> nino.martinez@jayway.dk> wrote:
>>> >>
>>> >>> Really strange... I have something similar on 1.4, although never more
>>> >>> that 1 nested form.
>>> >>>
>>> >>> Could you show us some code and markup cut out?
>>> >>>
>>> >>>
>>> >>> Andrew Berman wrote:
>>> >>>
>>> >>>> Hello,
>>> >>>>
>>> >>>> I am using Wicket 1.3.5 and I created a panel which contains a form.
>>> I
>>> >>>> have
>>> >>>> a parent template page and a child of the parent page, both of which
>>> >>>> contain
>>> >>>> an instance of the panel.  However, even if I give the panels two
>>> >>>> different
>>> >>>> ids, I get an error like:
>>> >>>>
>>> >>>> The component [MarkupContainer [Component id = emailLabel]] has the
>>> >>>> same wicket:id as another component already added at the same level
>>> >>>>
>>> >>>> Why is this happening since I am putting them in a different part of
>>> >>>> the hierarchy?
>>> >>>>
>>> >>>> Thanks,
>>> >>>>
>>> >>>> Andrew
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>
>>> >>> --
>>> >>> -Wicket for love
>>> >>>
>>> >>> Nino Martinez Wael
>>> >>> Java Specialist @ Jayway DK
>>> >>> http://www.jayway.dk
>>> >>> +45 2936 7684
>>> >>>
>>> >>>
>>> >>>
>>> >>> ---------------------------------------------------------------------
>>> >>> 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
>>>
>>>
>>
>

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


Re: Issue with nested forms

Posted by Andrew Berman <at...@gmail.com>.
So even if I do this, all child pages need to add their components to the
body and not the direct page itself which to me doesn't seem right.  Is
there a way to get around this or is there a better way to add a dynamic
class to the body tag?

On Fri, Oct 31, 2008 at 2:54 PM, Andrew Berman <at...@gmail.com> wrote:

> Awesome, thanks Igor!
>
>
> On Fri, Oct 31, 2008 at 2:59 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>
>> put the container back, override its istransparentresolver() and return
>> true
>>
>> -igor
>>
>> On Fri, Oct 31, 2008 at 2:50 PM, Andrew Berman <at...@gmail.com>
>> wrote:
>> > Actually, i had something more like this:
>> >
>> > <body wicket:id="body">
>> >  <form wicket:id="form">...</form>
>> >  <wicket:child/>
>> > </body>
>> >
>> > And in the child:
>> >
>> > <form wicket:id="form"></form>
>> >
>> > When I removed the WebMarkupContainer on the body tag, everything worked
>> > perfectly.
>> >
>> > On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com>
>> wrote:
>> >
>> >> I figured out why it was happening.  It was because I put a
>> >> WebMarkupContainer on the body tag which includes the wicket:child.
>> So I
>> >> had:
>> >>
>> >> <body wicket:id="body">
>> >> <wicket:child/>
>> >> </body>
>> >>
>> >> I need to be able to dynamically update the class attribute on the body
>> tag
>> >> which exists in the parent page, how can I do this since the way I want
>> to
>> >> do it doesn't work?
>> >>
>> >>
>> >> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael
>> <
>> >> nino.martinez@jayway.dk> wrote:
>> >>
>> >>> Really strange... I have something similar on 1.4, although never more
>> >>> that 1 nested form.
>> >>>
>> >>> Could you show us some code and markup cut out?
>> >>>
>> >>>
>> >>> Andrew Berman wrote:
>> >>>
>> >>>> Hello,
>> >>>>
>> >>>> I am using Wicket 1.3.5 and I created a panel which contains a form.
>> I
>> >>>> have
>> >>>> a parent template page and a child of the parent page, both of which
>> >>>> contain
>> >>>> an instance of the panel.  However, even if I give the panels two
>> >>>> different
>> >>>> ids, I get an error like:
>> >>>>
>> >>>> The component [MarkupContainer [Component id = emailLabel]] has the
>> >>>> same wicket:id as another component already added at the same level
>> >>>>
>> >>>> Why is this happening since I am putting them in a different part of
>> >>>> the hierarchy?
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> Andrew
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> -Wicket for love
>> >>>
>> >>> Nino Martinez Wael
>> >>> Java Specialist @ Jayway DK
>> >>> http://www.jayway.dk
>> >>> +45 2936 7684
>> >>>
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> 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: Issue with nested forms

Posted by Andrew Berman <at...@gmail.com>.
Awesome, thanks Igor!

On Fri, Oct 31, 2008 at 2:59 PM, Igor Vaynberg <ig...@gmail.com>wrote:

> put the container back, override its istransparentresolver() and return
> true
>
> -igor
>
> On Fri, Oct 31, 2008 at 2:50 PM, Andrew Berman <at...@gmail.com> wrote:
> > Actually, i had something more like this:
> >
> > <body wicket:id="body">
> >  <form wicket:id="form">...</form>
> >  <wicket:child/>
> > </body>
> >
> > And in the child:
> >
> > <form wicket:id="form"></form>
> >
> > When I removed the WebMarkupContainer on the body tag, everything worked
> > perfectly.
> >
> > On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com>
> wrote:
> >
> >> I figured out why it was happening.  It was because I put a
> >> WebMarkupContainer on the body tag which includes the wicket:child.   So
> I
> >> had:
> >>
> >> <body wicket:id="body">
> >> <wicket:child/>
> >> </body>
> >>
> >> I need to be able to dynamically update the class attribute on the body
> tag
> >> which exists in the parent page, how can I do this since the way I want
> to
> >> do it doesn't work?
> >>
> >>
> >> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael <
> >> nino.martinez@jayway.dk> wrote:
> >>
> >>> Really strange... I have something similar on 1.4, although never more
> >>> that 1 nested form.
> >>>
> >>> Could you show us some code and markup cut out?
> >>>
> >>>
> >>> Andrew Berman wrote:
> >>>
> >>>> Hello,
> >>>>
> >>>> I am using Wicket 1.3.5 and I created a panel which contains a form. I
> >>>> have
> >>>> a parent template page and a child of the parent page, both of which
> >>>> contain
> >>>> an instance of the panel.  However, even if I give the panels two
> >>>> different
> >>>> ids, I get an error like:
> >>>>
> >>>> The component [MarkupContainer [Component id = emailLabel]] has the
> >>>> same wicket:id as another component already added at the same level
> >>>>
> >>>> Why is this happening since I am putting them in a different part of
> >>>> the hierarchy?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Andrew
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> -Wicket for love
> >>>
> >>> Nino Martinez Wael
> >>> Java Specialist @ Jayway DK
> >>> http://www.jayway.dk
> >>> +45 2936 7684
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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: Issue with nested forms

Posted by Igor Vaynberg <ig...@gmail.com>.
put the container back, override its istransparentresolver() and return true

-igor

On Fri, Oct 31, 2008 at 2:50 PM, Andrew Berman <at...@gmail.com> wrote:
> Actually, i had something more like this:
>
> <body wicket:id="body">
>  <form wicket:id="form">...</form>
>  <wicket:child/>
> </body>
>
> And in the child:
>
> <form wicket:id="form"></form>
>
> When I removed the WebMarkupContainer on the body tag, everything worked
> perfectly.
>
> On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com> wrote:
>
>> I figured out why it was happening.  It was because I put a
>> WebMarkupContainer on the body tag which includes the wicket:child.   So I
>> had:
>>
>> <body wicket:id="body">
>> <wicket:child/>
>> </body>
>>
>> I need to be able to dynamically update the class attribute on the body tag
>> which exists in the parent page, how can I do this since the way I want to
>> do it doesn't work?
>>
>>
>> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael <
>> nino.martinez@jayway.dk> wrote:
>>
>>> Really strange... I have something similar on 1.4, although never more
>>> that 1 nested form.
>>>
>>> Could you show us some code and markup cut out?
>>>
>>>
>>> Andrew Berman wrote:
>>>
>>>> Hello,
>>>>
>>>> I am using Wicket 1.3.5 and I created a panel which contains a form. I
>>>> have
>>>> a parent template page and a child of the parent page, both of which
>>>> contain
>>>> an instance of the panel.  However, even if I give the panels two
>>>> different
>>>> ids, I get an error like:
>>>>
>>>> The component [MarkupContainer [Component id = emailLabel]] has the
>>>> same wicket:id as another component already added at the same level
>>>>
>>>> Why is this happening since I am putting them in a different part of
>>>> the hierarchy?
>>>>
>>>> Thanks,
>>>>
>>>> Andrew
>>>>
>>>>
>>>>
>>>
>>> --
>>> -Wicket for love
>>>
>>> Nino Martinez Wael
>>> Java Specialist @ Jayway DK
>>> http://www.jayway.dk
>>> +45 2936 7684
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: Issue with nested forms

Posted by Andrew Berman <at...@gmail.com>.
Actually, i had something more like this:

<body wicket:id="body">
  <form wicket:id="form">...</form>
  <wicket:child/>
</body>

And in the child:

<form wicket:id="form"></form>

When I removed the WebMarkupContainer on the body tag, everything worked
perfectly.

On Fri, Oct 31, 2008 at 2:48 PM, Andrew Berman <at...@gmail.com> wrote:

> I figured out why it was happening.  It was because I put a
> WebMarkupContainer on the body tag which includes the wicket:child.   So I
> had:
>
> <body wicket:id="body">
> <wicket:child/>
> </body>
>
> I need to be able to dynamically update the class attribute on the body tag
> which exists in the parent page, how can I do this since the way I want to
> do it doesn't work?
>
>
> On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael <
> nino.martinez@jayway.dk> wrote:
>
>> Really strange... I have something similar on 1.4, although never more
>> that 1 nested form.
>>
>> Could you show us some code and markup cut out?
>>
>>
>> Andrew Berman wrote:
>>
>>> Hello,
>>>
>>> I am using Wicket 1.3.5 and I created a panel which contains a form. I
>>> have
>>> a parent template page and a child of the parent page, both of which
>>> contain
>>> an instance of the panel.  However, even if I give the panels two
>>> different
>>> ids, I get an error like:
>>>
>>> The component [MarkupContainer [Component id = emailLabel]] has the
>>> same wicket:id as another component already added at the same level
>>>
>>> Why is this happening since I am putting them in a different part of
>>> the hierarchy?
>>>
>>> Thanks,
>>>
>>> Andrew
>>>
>>>
>>>
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Issue with nested forms

Posted by Andrew Berman <at...@gmail.com>.
I figured out why it was happening.  It was because I put a
WebMarkupContainer on the body tag which includes the wicket:child.   So I
had:

<body wicket:id="body">
<wicket:child/>
</body>

I need to be able to dynamically update the class attribute on the body tag
which exists in the parent page, how can I do this since the way I want to
do it doesn't work?

On Thu, Oct 30, 2008 at 11:28 PM, Nino Saturnino Martinez Vazquez Wael <
nino.martinez@jayway.dk> wrote:

> Really strange... I have something similar on 1.4, although never more that
> 1 nested form.
>
> Could you show us some code and markup cut out?
>
>
> Andrew Berman wrote:
>
>> Hello,
>>
>> I am using Wicket 1.3.5 and I created a panel which contains a form. I
>> have
>> a parent template page and a child of the parent page, both of which
>> contain
>> an instance of the panel.  However, even if I give the panels two
>> different
>> ids, I get an error like:
>>
>> The component [MarkupContainer [Component id = emailLabel]] has the
>> same wicket:id as another component already added at the same level
>>
>> Why is this happening since I am putting them in a different part of
>> the hierarchy?
>>
>> Thanks,
>>
>> Andrew
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Issue with nested forms

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Really strange... I have something similar on 1.4, although never more 
that 1 nested form.

Could you show us some code and markup cut out?

Andrew Berman wrote:
> Hello,
>
> I am using Wicket 1.3.5 and I created a panel which contains a form. I have
> a parent template page and a child of the parent page, both of which contain
> an instance of the panel.  However, even if I give the panels two different
> ids, I get an error like:
>
> The component [MarkupContainer [Component id = emailLabel]] has the
> same wicket:id as another component already added at the same level
>
> Why is this happening since I am putting them in a different part of
> the hierarchy?
>
> Thanks,
>
> Andrew
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: Issue with nested forms

Posted by Igor Vaynberg <ig...@gmail.com>.
are you sure this still happens if you remove one of them? only
immediate parent is checked for id collissions so unless you are
somehow adding two components with id emaillabel to the same parent
you wont get this error. feel free to create a quickstart that
reproduces it.

-igor

On Thu, Oct 30, 2008 at 5:46 PM, Andrew Berman <at...@gmail.com> wrote:
> Hello,
>
> I am using Wicket 1.3.5 and I created a panel which contains a form. I have
> a parent template page and a child of the parent page, both of which contain
> an instance of the panel.  However, even if I give the panels two different
> ids, I get an error like:
>
> The component [MarkupContainer [Component id = emailLabel]] has the
> same wicket:id as another component already added at the same level
>
> Why is this happening since I am putting them in a different part of
> the hierarchy?
>
> Thanks,
>
> Andrew
>

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