You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Richard Wallace <rw...@thewallacepack.net> on 2005/08/08 20:58:27 UTC

Tracking down duplicate ids

Hey everybody,

Got a nasty little problem that I'm not sure what the best way to go 
about solving it is.  I've got a page with a couple of dataTables and a 
couple of forms on it.  One form and dataTable is for one type of object 
and the other form and dataTable are for another type of object.  The 
forms are for adding new instances.

The problem I'm running into is that after adding an instance of either 
type I get these exceptions:

javax.faces.FacesException: cannot add component with id '_id55' and 
path : {Component-Path : [Class: 
javax.faces.component.html.HtmlOutputText,Id: _id55]} to its parent 
component. This might be a problem due to duplicate ids.

On most of the elements I'm just letting myfaces generate the ids, so 
I'm not sure how this is happening.  If I just goto the url directly 
after doing the add it works fine and the new entries are shown.

What's the best way to track down what is actually causing this?  Should 
I just start giving ids to all my jsf elements or what?

Thanks,
Rich

Re: Tracking down duplicate ids

Posted by Richard Wallace <rw...@thewallacepack.net>.
Nope, I don't do anything with component bindings.  Pretty simple stuff 
really.  I'll try and track down the problem later when I have a little 
more time cause I don't really want to have to put id's on every single 
JSF element on my pages =P

I'll let you all know what I find.

Rich

Martin Marinschek wrote:

> Sorry,
>
> I misunderstood the message - of course your component does not have a 
> parent if it can't be added ;)
>
> do you do anything with component bindings? I have had problems with 
> that and exactly this error-message, as far as I remember...
>
> If not, try to track it down to exactly one component by taking out 
> other stuff from the datatable.
>
> regards,
>
> Martin
>
> On 8/8/05, *Balaji Saranathan* <balaji.saranathan@wipro.com 
> <ma...@wipro.com>> wrote:
>
>
>     One more case to convince myself not to depend on auto-generated ids.
>     Not necessary that they should be within the form.
>     Was it a h:commandLink ?. CommandLink I know generates a form and
>     does a
>     submit on the click.
>
>     -----Original Message-----
>     From: Richard Wallace [mailto:rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>]
>     Sent: Monday, August 08, 2005 5:08 PM
>     To: MyFaces Discussion
>     Subject: Re: Tracking down duplicate ids
>
>
>     After putting ids on all the elements in the tables (including
>     <h:column>, <h:outputText> and <h:outputLink> elements) the problem
>     seems to have gone away.
>
>     I think the element it was choking on was a link that was outside any
>     forms.  So only parent it would have had was the <f:view>
>     element.  That
>
>     should be okay right? JSF elements don't all have to be within
>     <h:form>
>     elements do they?
>
>     Rich
>
>     Martin Marinschek wrote:
>
>     > The thing with the duplicate id's is only one possible reason.
>     >
>     > you should look at the component path that is indicated -
>     according to
>     > that, your component would need to be a top-level object - it
>     does not
>
>     > have any parent object at all?
>     >
>     > regards,
>     >
>     > Martin
>     >
>     > On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>
>     > <mailto:rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>>> wrote:
>     >
>     >     Ok, a bit of an update.  The issue only comes up when I have
>     both
>     >     of the
>     >     tables on the same page.  If I comment one out with <%-- %>
>     tags
>     then
>     >     everything works fine when adding.  I can comment out either one
>     >     so it's
>     >     not a problem specific to just one of the tables, it's something
>     about
>     >     having them both that is causing the problem.
>     >
>     >     Any ideas?
>     >
>     >     Thanks again,
>     >     Rich
>     >
>     >     Balaji Saranathan wrote:
>     >
>     >     >I'm not sure about the problem at your hand,
>     >     >But I have found it extremely helpful and clean in
>     assigning the
>     IDs
>     >     >myself to all the components in a page. It helps in debugging
>     too.
>     >     >
>     >     >-----Original Message-----
>     >     >From: Richard Wallace [mailto: rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>
>     >     <mailto:rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>>]
>     >     >Sent: Monday, August 08, 2005 2:58 PM
>     >     >To: MyFaces Discussion
>     >     >Subject: Tracking down duplicate ids
>     >     >
>     >     >
>     >     >Hey everybody,
>     >     >
>     >     >Got a nasty little problem that I'm not sure what the best
>     way to
>     go
>     >     >about solving it is.  I've got a page with a couple of
>     dataTables
>     >     and a
>     >     >couple of forms on it.  One form and dataTable is for one
>     type of
>     >     object
>     >     >
>     >     >and the other form and dataTable are for another type of
>     object.
>     The
>     >     >forms are for adding new instances.
>     >     >
>     >     >The problem I'm running into is that after adding an
>     instance of
>     >     either
>     >     >type I get these exceptions:
>     >     >
>     >     >javax.faces.FacesException: cannot add component with id
>     '_id55'
>     and
>     >     >path : {Component-Path : [Class:
>     >     >javax.faces.component.html.HtmlOutputText,Id: _id55]} to its
>     parent
>     >     >component. This might be a problem due to duplicate ids.
>     >     >
>     >     >On most of the elements I'm just letting myfaces generate the
>     ids, so
>     >     >I'm not sure how this is happening.  If I just goto the url
>     directly
>     >     >after doing the add it works fine and the new entries are
>     shown.
>     >     >
>     >     >What's the best way to track down what is actually causing
>     >     this?  Should
>     >     >
>     >     >I just start giving ids to all my jsf elements or what?
>     >     >
>     >     >Thanks,
>     >     >Rich
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >Confidentiality Notice
>     >     >
>     >     >The information contained in this electronic message and any
>     >     attachments to this message are intended
>     >     >for the exclusive use of the addressee(s) and may contain
>     >     confidential or privileged information. If
>     >     >you are not the intended recipient, please notify the sender at
>     >     Wipro or Mailadmin@wipro.com <ma...@wipro.com>
>     <mailto: Mailadmin@wipro.com <ma...@wipro.com>>
>     immediately
>     >     >and destroy all copies of this message and any attachments.
>     >     >
>     >     >
>     >
>     >
>
>
>
>
>     Confidentiality Notice
>
>     The information contained in this electronic message and any
>     attachments to this message are intended
>     for the exclusive use of the addressee(s) and may contain
>     confidential or privileged information. If
>     you are not the intended recipient, please notify the sender at
>     Wipro or Mailadmin@wipro.com <ma...@wipro.com> immediately
>     and destroy all copies of this message and any attachments.
>
>


Re: Tracking down duplicate ids

Posted by Arash Bijanzadeh <ar...@gmail.com>.
On 8/9/05, Richard Wallace <rw...@thewallacepack.net> wrote:
> 
> No, it's not a <h:commandLink>. I think the problem occurred on a
> <h:outputText> element actually. Which is why I can't track it down now
> cause there are lots of those on the page =P



I have faced the same problem already , and the problem gone away with 
assigning my own ids to the tag. My only opinion is a bug in the generated 
ids which make them to be duplicate

Rich
> 
> John Fallows wrote:
> 
> >Hey Martin,
> >
> >Rich said that the issue was with a h:commandLink that lives outside a 
> form.
> >Doesn't MyFaces add a dummy form in that case?
> >Is it possible that two dummy forms are being implicitly added here,
> >with the same id, causing the collision?
> >
> >Thinking out loud in case it might inspire you. :-)
> >
> >Kind Regards,
> >John Fallows.
> >
> >On 8/8/05, Martin Marinschek <ma...@gmail.com> wrote:
> >
> >
> >>Sorry,
> >>
> >> I misunderstood the message - of course your component does not have a
> >>parent if it can't be added ;)
> >>
> >> do you do anything with component bindings? I have had problems with 
> that
> >>and exactly this error-message, as far as I remember...
> >>
> >> If not, try to track it down to exactly one component by taking out 
> other
> >>stuff from the datatable.
> >>
> >> regards,
> >>
> >> Martin
> >>
> >>
> >>On 8/8/05, Balaji Saranathan <ba...@wipro.com> wrote:
> >>
> >>
> >>>One more case to convince myself not to depend on auto-generated ids.
> >>>Not necessary that they should be within the form.
> >>>Was it a h:commandLink ?. CommandLink I know generates a form and does 
> a
> >>>submit on the click.
> >>>
> >>>-----Original Message-----
> >>>From: Richard Wallace [mailto:rwallace@thewallacepack.net]
> >>>Sent: Monday, August 08, 2005 5:08 PM
> >>>To: MyFaces Discussion
> >>>Subject: Re: Tracking down duplicate ids
> >>>
> >>>
> >>>After putting ids on all the elements in the tables (including
> >>><h:column>, <h:outputText> and <h:outputLink> elements) the problem
> >>>seems to have gone away.
> >>>
> >>>I think the element it was choking on was a link that was outside any
> >>>forms. So only parent it would have had was the <f:view> element. That
> >>>
> >>>should be okay right? JSF elements don't all have to be within <h:form>
> >>>elements do they?
> >>>
> >>>Rich
> >>>
> >>>Martin Marinschek wrote:
> >>>
> >>>
> >>>
> >>>>The thing with the duplicate id's is only one possible reason.
> >>>>
> >>>>you should look at the component path that is indicated - according to
> >>>>that, your component would need to be a top-level object - it does not
> >>>>
> >>>>
> >>>>have any parent object at all?
> >>>>
> >>>>regards,
> >>>>
> >>>>Martin
> >>>>
> >>>>On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
> >>>><ma...@thewallacepack.net>> wrote:
> >>>>
> >>>> Ok, a bit of an update. The issue only comes up when I have both
> >>>> of the
> >>>> tables on the same page. If I comment one out with <%-- %> tags
> >>>>
> >>>>
> >>>then
> >>>
> >>>
> >>>> everything works fine when adding. I can comment out either one
> >>>> so it's
> >>>> not a problem specific to just one of the tables, it's something
> >>>>
> >>>>
> >>>about
> >>>
> >>>
> >>>> having them both that is causing the problem.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Thanks again,
> >>>> Rich
> >>>>
> >>>> Balaji Saranathan wrote:
> >>>>
> >>>> >I'm not sure about the problem at your hand,
> >>>> >But I have found it extremely helpful and clean in assigning the
> >>>>
> >>>>
> >>>IDs
> >>>
> >>>
> >>>> >myself to all the components in a page. It helps in debugging
> >>>>
> >>>>
> >>>too.
> >>>
> >>>
> >>>> >
> >>>> >-----Original Message-----
> >>>> >From: Richard Wallace [mailto: rwallace@thewallacepack.net
> >>>> <ma...@thewallacepack.net>]
> >>>> >Sent: Monday, August 08, 2005 2:58 PM
> >>>> >To: MyFaces Discussion
> >>>> >Subject: Tracking down duplicate ids
> >>>> >
> >>>> >
> >>>> >Hey everybody,
> >>>> >
> >>>> >Got a nasty little problem that I'm not sure what the best way to
> >>>>
> >>>>
> >>>go
> >>>
> >>>
> >>>> >about solving it is. I've got a page with a couple of dataTables
> >>>> and a
> >>>> >couple of forms on it. One form and dataTable is for one type of
> >>>> object
> >>>> >
> >>>> >and the other form and dataTable are for another type of object.
> >>>>
> >>>>
> >>>The
> >>>
> >>>
> >>>> >forms are for adding new instances.
> >>>> >
> >>>> >The problem I'm running into is that after adding an instance of
> >>>> either
> >>>> >type I get these exceptions:
> >>>> >
> >>>> >javax.faces.FacesException: cannot add component with id '_id55'
> >>>>
> >>>>
> >>>and
> >>>
> >>>
> >>>> >path : {Component-Path : [Class:
> >>>> >javax.faces.component.html.HtmlOutputText,Id:
> >>>>
> >>>>
> >>_id55]} to its
> >>
> >>
> >>>parent
> >>>
> >>>
> >>>> >component. This might be a problem due to duplicate ids.
> >>>> >
> >>>> >On most of the elements I'm just letting myfaces generate the
> >>>>
> >>>>
> >>>ids, so
> >>>
> >>>
> >>>> >I'm not sure how this is happening. If I just goto the url
> >>>>
> >>>>
> >>>directly
> >>>
> >>>
> >>>> >after doing the add it works fine and the new entries are shown.
> >>>> >
> >>>> >What's the best way to track down what is actually causing
> >>>> this? Should
> >>>> >
> >>>> >I just start giving ids to all my jsf elements or what?
> >>>> >
> >>>> >Thanks,
> >>>> >Rich
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> >Confidentiality Notice
> >>>> >
> >>>> >The information contained in this electronic message and any
> >>>> attachments to this message are intended
> >>>> >for the exclusive use of the addressee(s) and may contain
> >>>> confidential or privileged information. If
> >>>> >you are not the intended recipient, please notify the sender at
> >>>> Wipro or Mailadmin@wipro.com <mailto: Mailadmin@wipro.com>
> >>>>
> >>>>
> >>>immediately
> >>>
> >>>
> >>>> >and destroy all copies of this message and any attachments.
> >>>> >
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>Confidentiality Notice
> >>>
> >>>The information contained in this electronic message and any 
> attachments
> >>>
> >>>
> >>to this message are intended
> >>
> >>
> >>>for the exclusive use of the addressee(s) and may contain confidential 
> or
> >>>
> >>>
> >>privileged information. If
> >>
> >>
> >>>you are not the intended recipient, please notify the sender at Wipro 
> or
> >>>
> >>>
> >>Mailadmin@wipro.com immediately
> >>
> >>
> >>>and destroy all copies of this message and any attachments.
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> 
> 


-- 
Abandon the search for Truth; settle for a good fantasy.

Re: Tracking down duplicate ids

Posted by Martin Marinschek <ma...@gmail.com>.
The thing is I had such a problem once - and I have completely forgotten 
what it was in the end. I ended up putting stuff out of the page, reload, 
putting other stuff out, reload, finally thinking - oh that was it, and 
thanks to my spongy brain, the solution is completely gone.

keep us updated!

regards,

Martin

On 8/9/05, Richard Wallace <rw...@thewallacepack.net> wrote:
> 
> No, it's not a <h:commandLink>. I think the problem occurred on a
> <h:outputText> element actually. Which is why I can't track it down now
> cause there are lots of those on the page =P
> 
> Rich
> 
> John Fallows wrote:
> 
> >Hey Martin,
> >
> >Rich said that the issue was with a h:commandLink that lives outside a 
> form.
> >Doesn't MyFaces add a dummy form in that case?
> >Is it possible that two dummy forms are being implicitly added here,
> >with the same id, causing the collision?
> >
> >Thinking out loud in case it might inspire you. :-)
> >
> >Kind Regards,
> >John Fallows.
> >
> >On 8/8/05, Martin Marinschek <ma...@gmail.com> wrote:
> >
> >
> >>Sorry,
> >>
> >> I misunderstood the message - of course your component does not have a
> >>parent if it can't be added ;)
> >>
> >> do you do anything with component bindings? I have had problems with 
> that
> >>and exactly this error-message, as far as I remember...
> >>
> >> If not, try to track it down to exactly one component by taking out 
> other
> >>stuff from the datatable.
> >>
> >> regards,
> >>
> >> Martin
> >>
> >>
> >>On 8/8/05, Balaji Saranathan <ba...@wipro.com> wrote:
> >>
> >>
> >>>One more case to convince myself not to depend on auto-generated ids.
> >>>Not necessary that they should be within the form.
> >>>Was it a h:commandLink ?. CommandLink I know generates a form and does 
> a
> >>>submit on the click.
> >>>
> >>>-----Original Message-----
> >>>From: Richard Wallace [mailto:rwallace@thewallacepack.net]
> >>>Sent: Monday, August 08, 2005 5:08 PM
> >>>To: MyFaces Discussion
> >>>Subject: Re: Tracking down duplicate ids
> >>>
> >>>
> >>>After putting ids on all the elements in the tables (including
> >>><h:column>, <h:outputText> and <h:outputLink> elements) the problem
> >>>seems to have gone away.
> >>>
> >>>I think the element it was choking on was a link that was outside any
> >>>forms. So only parent it would have had was the <f:view> element. That
> >>>
> >>>should be okay right? JSF elements don't all have to be within <h:form>
> >>>elements do they?
> >>>
> >>>Rich
> >>>
> >>>Martin Marinschek wrote:
> >>>
> >>>
> >>>
> >>>>The thing with the duplicate id's is only one possible reason.
> >>>>
> >>>>you should look at the component path that is indicated - according to
> >>>>that, your component would need to be a top-level object - it does not
> >>>>
> >>>>
> >>>>have any parent object at all?
> >>>>
> >>>>regards,
> >>>>
> >>>>Martin
> >>>>
> >>>>On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
> >>>><ma...@thewallacepack.net>> wrote:
> >>>>
> >>>> Ok, a bit of an update. The issue only comes up when I have both
> >>>> of the
> >>>> tables on the same page. If I comment one out with <%-- %> tags
> >>>>
> >>>>
> >>>then
> >>>
> >>>
> >>>> everything works fine when adding. I can comment out either one
> >>>> so it's
> >>>> not a problem specific to just one of the tables, it's something
> >>>>
> >>>>
> >>>about
> >>>
> >>>
> >>>> having them both that is causing the problem.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Thanks again,
> >>>> Rich
> >>>>
> >>>> Balaji Saranathan wrote:
> >>>>
> >>>> >I'm not sure about the problem at your hand,
> >>>> >But I have found it extremely helpful and clean in assigning the
> >>>>
> >>>>
> >>>IDs
> >>>
> >>>
> >>>> >myself to all the components in a page. It helps in debugging
> >>>>
> >>>>
> >>>too.
> >>>
> >>>
> >>>> >
> >>>> >-----Original Message-----
> >>>> >From: Richard Wallace [mailto: rwallace@thewallacepack.net
> >>>> <ma...@thewallacepack.net>]
> >>>> >Sent: Monday, August 08, 2005 2:58 PM
> >>>> >To: MyFaces Discussion
> >>>> >Subject: Tracking down duplicate ids
> >>>> >
> >>>> >
> >>>> >Hey everybody,
> >>>> >
> >>>> >Got a nasty little problem that I'm not sure what the best way to
> >>>>
> >>>>
> >>>go
> >>>
> >>>
> >>>> >about solving it is. I've got a page with a couple of dataTables
> >>>> and a
> >>>> >couple of forms on it. One form and dataTable is for one type of
> >>>> object
> >>>> >
> >>>> >and the other form and dataTable are for another type of object.
> >>>>
> >>>>
> >>>The
> >>>
> >>>
> >>>> >forms are for adding new instances.
> >>>> >
> >>>> >The problem I'm running into is that after adding an instance of
> >>>> either
> >>>> >type I get these exceptions:
> >>>> >
> >>>> >javax.faces.FacesException: cannot add component with id '_id55'
> >>>>
> >>>>
> >>>and
> >>>
> >>>
> >>>> >path : {Component-Path : [Class:
> >>>> >javax.faces.component.html.HtmlOutputText,Id:
> >>>>
> >>>>
> >>_id55]} to its
> >>
> >>
> >>>parent
> >>>
> >>>
> >>>> >component. This might be a problem due to duplicate ids.
> >>>> >
> >>>> >On most of the elements I'm just letting myfaces generate the
> >>>>
> >>>>
> >>>ids, so
> >>>
> >>>
> >>>> >I'm not sure how this is happening. If I just goto the url
> >>>>
> >>>>
> >>>directly
> >>>
> >>>
> >>>> >after doing the add it works fine and the new entries are shown.
> >>>> >
> >>>> >What's the best way to track down what is actually causing
> >>>> this? Should
> >>>> >
> >>>> >I just start giving ids to all my jsf elements or what?
> >>>> >
> >>>> >Thanks,
> >>>> >Rich
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> >Confidentiality Notice
> >>>> >
> >>>> >The information contained in this electronic message and any
> >>>> attachments to this message are intended
> >>>> >for the exclusive use of the addressee(s) and may contain
> >>>> confidential or privileged information. If
> >>>> >you are not the intended recipient, please notify the sender at
> >>>> Wipro or Mailadmin@wipro.com <mailto: Mailadmin@wipro.com>
> >>>>
> >>>>
> >>>immediately
> >>>
> >>>
> >>>> >and destroy all copies of this message and any attachments.
> >>>> >
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>Confidentiality Notice
> >>>
> >>>The information contained in this electronic message and any 
> attachments
> >>>
> >>>
> >>to this message are intended
> >>
> >>
> >>>for the exclusive use of the addressee(s) and may contain confidential 
> or
> >>>
> >>>
> >>privileged information. If
> >>
> >>
> >>>you are not the intended recipient, please notify the sender at Wipro 
> or
> >>>
> >>>
> >>Mailadmin@wipro.com immediately
> >>
> >>
> >>>and destroy all copies of this message and any attachments.
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> 
>

Re: Tracking down duplicate ids

Posted by Richard Wallace <rw...@thewallacepack.net>.
No, it's not a <h:commandLink>.  I think the problem occurred on a 
<h:outputText> element actually.  Which is why I can't track it down now 
cause there are lots of those on the page =P

Rich

John Fallows wrote:

>Hey Martin,
>
>Rich said that the issue was with a h:commandLink that lives outside a form.
>Doesn't MyFaces add a dummy form in that case?  
>Is it possible that two dummy forms are being implicitly added here,
>with the same id, causing the collision?
>
>Thinking out loud in case it might inspire you. :-)
>
>Kind Regards,
>John Fallows.
>
>On 8/8/05, Martin Marinschek <ma...@gmail.com> wrote:
>  
>
>>Sorry,
>> 
>> I misunderstood the message - of course your component does not have a
>>parent if it can't be added ;)
>> 
>> do you do anything with component bindings? I have had problems with that
>>and exactly this error-message, as far as I remember...
>> 
>> If not, try to track it down to exactly one component by taking out other
>>stuff from the datatable.
>> 
>> regards,
>> 
>> Martin
>>
>> 
>>On 8/8/05, Balaji Saranathan <ba...@wipro.com> wrote:
>>    
>>
>>>One more case to convince myself not to depend on auto-generated ids.
>>>Not necessary that they should be within the form.
>>>Was it a h:commandLink ?. CommandLink I know generates a form and does a
>>>submit on the click. 
>>>
>>>-----Original Message-----
>>>From: Richard Wallace [mailto:rwallace@thewallacepack.net]
>>>Sent: Monday, August 08, 2005 5:08 PM
>>>To: MyFaces Discussion
>>>Subject: Re: Tracking down duplicate ids 
>>>
>>>
>>>After putting ids on all the elements in the tables (including
>>><h:column>, <h:outputText> and <h:outputLink> elements) the problem
>>>seems to have gone away.
>>>
>>>I think the element it was choking on was a link that was outside any 
>>>forms.  So only parent it would have had was the <f:view> element.  That
>>>
>>>should be okay right? JSF elements don't all have to be within <h:form>
>>>elements do they?
>>>
>>>Rich
>>>
>>>Martin Marinschek wrote: 
>>>
>>>      
>>>
>>>>The thing with the duplicate id's is only one possible reason.
>>>>
>>>>you should look at the component path that is indicated - according to
>>>>that, your component would need to be a top-level object - it does not 
>>>>        
>>>>
>>>>have any parent object at all?
>>>>
>>>>regards,
>>>>
>>>>Martin
>>>>
>>>>On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
>>>><ma...@thewallacepack.net>> wrote:
>>>>
>>>>    Ok, a bit of an update.  The issue only comes up when I have both
>>>>    of the
>>>>    tables on the same page.  If I comment one out with <%-- %> tags 
>>>>        
>>>>
>>>then
>>>      
>>>
>>>>    everything works fine when adding.  I can comment out either one
>>>>    so it's
>>>>    not a problem specific to just one of the tables, it's something
>>>>        
>>>>
>>>about
>>>      
>>>
>>>>    having them both that is causing the problem. 
>>>>
>>>>    Any ideas?
>>>>
>>>>    Thanks again,
>>>>    Rich
>>>>
>>>>    Balaji Saranathan wrote:
>>>>
>>>>    >I'm not sure about the problem at your hand,
>>>>    >But I have found it extremely helpful and clean in assigning the 
>>>>        
>>>>
>>>IDs
>>>      
>>>
>>>>    >myself to all the components in a page. It helps in debugging
>>>>        
>>>>
>>>too.
>>>      
>>>
>>>>    >
>>>>    >-----Original Message-----
>>>>    >From: Richard Wallace [mailto: rwallace@thewallacepack.net
>>>>    <ma...@thewallacepack.net>]
>>>>    >Sent: Monday, August 08, 2005 2:58 PM
>>>>    >To: MyFaces Discussion 
>>>>    >Subject: Tracking down duplicate ids
>>>>    >
>>>>    >
>>>>    >Hey everybody,
>>>>    >
>>>>    >Got a nasty little problem that I'm not sure what the best way to
>>>>        
>>>>
>>>go
>>>      
>>>
>>>>    >about solving it is.  I've got a page with a couple of dataTables
>>>>    and a
>>>>    >couple of forms on it.  One form and dataTable is for one type of
>>>>    object
>>>>    >
>>>>    >and the other form and dataTable are for another type of object.
>>>>        
>>>>
>>>The
>>>      
>>>
>>>>    >forms are for adding new instances.
>>>>    >
>>>>    >The problem I'm running into is that after adding an instance of 
>>>>    either
>>>>    >type I get these exceptions:
>>>>    >
>>>>    >javax.faces.FacesException: cannot add component with id '_id55'
>>>>        
>>>>
>>>and
>>>      
>>>
>>>>    >path : {Component-Path : [Class:
>>>>    >javax.faces.component.html.HtmlOutputText,Id:
>>>>        
>>>>
>>_id55]} to its
>>    
>>
>>>parent
>>>      
>>>
>>>>    >component. This might be a problem due to duplicate ids.
>>>>    >
>>>>    >On most of the elements I'm just letting myfaces generate the 
>>>>        
>>>>
>>>ids, so
>>>      
>>>
>>>>    >I'm not sure how this is happening.  If I just goto the url
>>>>        
>>>>
>>>directly
>>>      
>>>
>>>>    >after doing the add it works fine and the new entries are shown.
>>>>    >
>>>>    >What's the best way to track down what is actually causing 
>>>>    this?  Should
>>>>    >
>>>>    >I just start giving ids to all my jsf elements or what?
>>>>    >
>>>>    >Thanks,
>>>>    >Rich
>>>>    >
>>>>    >
>>>>    > 
>>>>    >
>>>>    >Confidentiality Notice
>>>>    >
>>>>    >The information contained in this electronic message and any
>>>>    attachments to this message are intended
>>>>    >for the exclusive use of the addressee(s) and may contain 
>>>>    confidential or privileged information. If
>>>>    >you are not the intended recipient, please notify the sender at
>>>>    Wipro or Mailadmin@wipro.com <mailto: Mailadmin@wipro.com>
>>>>        
>>>>
>>>immediately
>>>      
>>>
>>>>    >and destroy all copies of this message and any attachments.
>>>>    >
>>>>    >
>>>>
>>>>
>>>>        
>>>>
>>>
>>>
>>>Confidentiality Notice
>>>
>>>The information contained in this electronic message and any attachments
>>>      
>>>
>>to this message are intended
>>    
>>
>>>for the exclusive use of the addressee(s) and may contain confidential or
>>>      
>>>
>>privileged information. If 
>>    
>>
>>>you are not the intended recipient, please notify the sender at Wipro or
>>>      
>>>
>>Mailadmin@wipro.com immediately
>>    
>>
>>>and destroy all copies of this message and any attachments.
>>>
>>>      
>>>
>> 
>>
>>    
>>


Re: Tracking down duplicate ids

Posted by John Fallows <jo...@gmail.com>.
Hey Martin,

Rich said that the issue was with a h:commandLink that lives outside a form.
Doesn't MyFaces add a dummy form in that case?  
Is it possible that two dummy forms are being implicitly added here,
with the same id, causing the collision?

Thinking out loud in case it might inspire you. :-)

Kind Regards,
John Fallows.

On 8/8/05, Martin Marinschek <ma...@gmail.com> wrote:
> Sorry,
>  
>  I misunderstood the message - of course your component does not have a
> parent if it can't be added ;)
>  
>  do you do anything with component bindings? I have had problems with that
> and exactly this error-message, as far as I remember...
>  
>  If not, try to track it down to exactly one component by taking out other
> stuff from the datatable.
>  
>  regards,
>  
>  Martin
> 
>  
> On 8/8/05, Balaji Saranathan <ba...@wipro.com> wrote:
> > 
> > One more case to convince myself not to depend on auto-generated ids.
> > Not necessary that they should be within the form.
> > Was it a h:commandLink ?. CommandLink I know generates a form and does a
> > submit on the click. 
> > 
> > -----Original Message-----
> > From: Richard Wallace [mailto:rwallace@thewallacepack.net]
> > Sent: Monday, August 08, 2005 5:08 PM
> > To: MyFaces Discussion
> > Subject: Re: Tracking down duplicate ids 
> > 
> > 
> > After putting ids on all the elements in the tables (including
> > <h:column>, <h:outputText> and <h:outputLink> elements) the problem
> > seems to have gone away.
> > 
> > I think the element it was choking on was a link that was outside any 
> > forms.  So only parent it would have had was the <f:view> element.  That
> > 
> > should be okay right? JSF elements don't all have to be within <h:form>
> > elements do they?
> > 
> > Rich
> > 
> > Martin Marinschek wrote: 
> > 
> > > The thing with the duplicate id's is only one possible reason.
> > >
> > > you should look at the component path that is indicated - according to
> > > that, your component would need to be a top-level object - it does not 
> > 
> > > have any parent object at all?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
> > > <ma...@thewallacepack.net>> wrote:
> > >
> > >     Ok, a bit of an update.  The issue only comes up when I have both
> > >     of the
> > >     tables on the same page.  If I comment one out with <%-- %> tags 
> > then
> > >     everything works fine when adding.  I can comment out either one
> > >     so it's
> > >     not a problem specific to just one of the tables, it's something
> > about
> > >     having them both that is causing the problem. 
> > >
> > >     Any ideas?
> > >
> > >     Thanks again,
> > >     Rich
> > >
> > >     Balaji Saranathan wrote:
> > >
> > >     >I'm not sure about the problem at your hand,
> > >     >But I have found it extremely helpful and clean in assigning the 
> > IDs
> > >     >myself to all the components in a page. It helps in debugging
> > too.
> > >     >
> > >     >-----Original Message-----
> > >     >From: Richard Wallace [mailto: rwallace@thewallacepack.net
> > >     <ma...@thewallacepack.net>]
> > >     >Sent: Monday, August 08, 2005 2:58 PM
> > >     >To: MyFaces Discussion 
> > >     >Subject: Tracking down duplicate ids
> > >     >
> > >     >
> > >     >Hey everybody,
> > >     >
> > >     >Got a nasty little problem that I'm not sure what the best way to
> > go
> > >     >about solving it is.  I've got a page with a couple of dataTables
> > >     and a
> > >     >couple of forms on it.  One form and dataTable is for one type of
> > >     object
> > >     >
> > >     >and the other form and dataTable are for another type of object.
> > The
> > >     >forms are for adding new instances.
> > >     >
> > >     >The problem I'm running into is that after adding an instance of 
> > >     either
> > >     >type I get these exceptions:
> > >     >
> > >     >javax.faces.FacesException: cannot add component with id '_id55'
> > and
> > >     >path : {Component-Path : [Class:
> > >     >javax.faces.component.html.HtmlOutputText,Id:
> _id55]} to its
> > parent
> > >     >component. This might be a problem due to duplicate ids.
> > >     >
> > >     >On most of the elements I'm just letting myfaces generate the 
> > ids, so
> > >     >I'm not sure how this is happening.  If I just goto the url
> > directly
> > >     >after doing the add it works fine and the new entries are shown.
> > >     >
> > >     >What's the best way to track down what is actually causing 
> > >     this?  Should
> > >     >
> > >     >I just start giving ids to all my jsf elements or what?
> > >     >
> > >     >Thanks,
> > >     >Rich
> > >     >
> > >     >
> > >     > 
> > >     >
> > >     >Confidentiality Notice
> > >     >
> > >     >The information contained in this electronic message and any
> > >     attachments to this message are intended
> > >     >for the exclusive use of the addressee(s) and may contain 
> > >     confidential or privileged information. If
> > >     >you are not the intended recipient, please notify the sender at
> > >     Wipro or Mailadmin@wipro.com <mailto: Mailadmin@wipro.com>
> > immediately
> > >     >and destroy all copies of this message and any attachments.
> > >     >
> > >     >
> > >
> > >
> > 
> > 
> > 
> > 
> > Confidentiality Notice
> > 
> > The information contained in this electronic message and any attachments
> to this message are intended
> > for the exclusive use of the addressee(s) and may contain confidential or
> privileged information. If 
> > you are not the intended recipient, please notify the sender at Wipro or
> Mailadmin@wipro.com immediately
> > and destroy all copies of this message and any attachments.
> > 
>  
>

Re: Tracking down duplicate ids

Posted by Martin Marinschek <ma...@gmail.com>.
Sorry,

I misunderstood the message - of course your component does not have a 
parent if it can't be added ;)

do you do anything with component bindings? I have had problems with that 
and exactly this error-message, as far as I remember...

If not, try to track it down to exactly one component by taking out other 
stuff from the datatable.

regards,

Martin

On 8/8/05, Balaji Saranathan <ba...@wipro.com> wrote:
> 
> 
> One more case to convince myself not to depend on auto-generated ids.
> Not necessary that they should be within the form.
> Was it a h:commandLink ?. CommandLink I know generates a form and does a
> submit on the click.
> 
> -----Original Message-----
> From: Richard Wallace [mailto:rwallace@thewallacepack.net]
> Sent: Monday, August 08, 2005 5:08 PM
> To: MyFaces Discussion
> Subject: Re: Tracking down duplicate ids
> 
> 
> After putting ids on all the elements in the tables (including
> <h:column>, <h:outputText> and <h:outputLink> elements) the problem
> seems to have gone away.
> 
> I think the element it was choking on was a link that was outside any
> forms. So only parent it would have had was the <f:view> element. That
> 
> should be okay right? JSF elements don't all have to be within <h:form>
> elements do they?
> 
> Rich
> 
> Martin Marinschek wrote:
> 
> > The thing with the duplicate id's is only one possible reason.
> >
> > you should look at the component path that is indicated - according to
> > that, your component would need to be a top-level object - it does not
> 
> > have any parent object at all?
> >
> > regards,
> >
> > Martin
> >
> > On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
> > <ma...@thewallacepack.net>> wrote:
> >
> > Ok, a bit of an update. The issue only comes up when I have both
> > of the
> > tables on the same page. If I comment one out with <%-- %> tags
> then
> > everything works fine when adding. I can comment out either one
> > so it's
> > not a problem specific to just one of the tables, it's something
> about
> > having them both that is causing the problem.
> >
> > Any ideas?
> >
> > Thanks again,
> > Rich
> >
> > Balaji Saranathan wrote:
> >
> > >I'm not sure about the problem at your hand,
> > >But I have found it extremely helpful and clean in assigning the
> IDs
> > >myself to all the components in a page. It helps in debugging
> too.
> > >
> > >-----Original Message-----
> > >From: Richard Wallace [mailto: rwallace@thewallacepack.net
> > <ma...@thewallacepack.net>]
> > >Sent: Monday, August 08, 2005 2:58 PM
> > >To: MyFaces Discussion
> > >Subject: Tracking down duplicate ids
> > >
> > >
> > >Hey everybody,
> > >
> > >Got a nasty little problem that I'm not sure what the best way to
> go
> > >about solving it is. I've got a page with a couple of dataTables
> > and a
> > >couple of forms on it. One form and dataTable is for one type of
> > object
> > >
> > >and the other form and dataTable are for another type of object.
> The
> > >forms are for adding new instances.
> > >
> > >The problem I'm running into is that after adding an instance of
> > either
> > >type I get these exceptions:
> > >
> > >javax.faces.FacesException: cannot add component with id '_id55'
> and
> > >path : {Component-Path : [Class:
> > >javax.faces.component.html.HtmlOutputText,Id: _id55]} to its
> parent
> > >component. This might be a problem due to duplicate ids.
> > >
> > >On most of the elements I'm just letting myfaces generate the
> ids, so
> > >I'm not sure how this is happening. If I just goto the url
> directly
> > >after doing the add it works fine and the new entries are shown.
> > >
> > >What's the best way to track down what is actually causing
> > this? Should
> > >
> > >I just start giving ids to all my jsf elements or what?
> > >
> > >Thanks,
> > >Rich
> > >
> > >
> > >
> > >
> > >Confidentiality Notice
> > >
> > >The information contained in this electronic message and any
> > attachments to this message are intended
> > >for the exclusive use of the addressee(s) and may contain
> > confidential or privileged information. If
> > >you are not the intended recipient, please notify the sender at
> > Wipro or Mailadmin@wipro.com <ma...@wipro.com>
> immediately
> > >and destroy all copies of this message and any attachments.
> > >
> > >
> >
> >
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments 
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or 
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or 
> Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
>

RE: Tracking down duplicate ids

Posted by Balaji Saranathan <ba...@wipro.com>.
One more case to convince myself not to depend on auto-generated ids.
Not necessary that they should be within the form. 
Was it a h:commandLink ?. CommandLink I know generates a form and does a
submit on the click.

-----Original Message-----
From: Richard Wallace [mailto:rwallace@thewallacepack.net] 
Sent: Monday, August 08, 2005 5:08 PM
To: MyFaces Discussion
Subject: Re: Tracking down duplicate ids


After putting ids on all the elements in the tables (including 
<h:column>, <h:outputText> and <h:outputLink> elements) the problem 
seems to have gone away.

I think the element it was choking on was a link that was outside any 
forms.  So only parent it would have had was the <f:view> element.  That

should be okay right? JSF elements don't all have to be within <h:form> 
elements do they?

Rich

Martin Marinschek wrote:

> The thing with the duplicate id's is only one possible reason.
>
> you should look at the component path that is indicated - according to
> that, your component would need to be a top-level object - it does not

> have any parent object at all?
>
> regards,
>
> Martin
>
> On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net
> <ma...@thewallacepack.net>> wrote:
>
>     Ok, a bit of an update.  The issue only comes up when I have both
>     of the
>     tables on the same page.  If I comment one out with <%-- %> tags
then
>     everything works fine when adding.  I can comment out either one
>     so it's
>     not a problem specific to just one of the tables, it's something
about
>     having them both that is causing the problem.
>
>     Any ideas?
>
>     Thanks again,
>     Rich
>
>     Balaji Saranathan wrote:
>
>     >I'm not sure about the problem at your hand,
>     >But I have found it extremely helpful and clean in assigning the
IDs
>     >myself to all the components in a page. It helps in debugging
too.
>     >
>     >-----Original Message-----
>     >From: Richard Wallace [mailto: rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>]
>     >Sent: Monday, August 08, 2005 2:58 PM
>     >To: MyFaces Discussion
>     >Subject: Tracking down duplicate ids
>     >
>     >
>     >Hey everybody,
>     >
>     >Got a nasty little problem that I'm not sure what the best way to
go
>     >about solving it is.  I've got a page with a couple of dataTables
>     and a
>     >couple of forms on it.  One form and dataTable is for one type of
>     object
>     >
>     >and the other form and dataTable are for another type of object.
The
>     >forms are for adding new instances.
>     >
>     >The problem I'm running into is that after adding an instance of
>     either
>     >type I get these exceptions:
>     >
>     >javax.faces.FacesException: cannot add component with id '_id55'
and
>     >path : {Component-Path : [Class:
>     >javax.faces.component.html.HtmlOutputText,Id: _id55]} to its
parent
>     >component. This might be a problem due to duplicate ids.
>     >
>     >On most of the elements I'm just letting myfaces generate the
ids, so
>     >I'm not sure how this is happening.  If I just goto the url
directly
>     >after doing the add it works fine and the new entries are shown.
>     >
>     >What's the best way to track down what is actually causing
>     this?  Should
>     >
>     >I just start giving ids to all my jsf elements or what?
>     >
>     >Thanks,
>     >Rich
>     >
>     >
>     >
>     >
>     >Confidentiality Notice
>     >
>     >The information contained in this electronic message and any
>     attachments to this message are intended
>     >for the exclusive use of the addressee(s) and may contain
>     confidential or privileged information. If
>     >you are not the intended recipient, please notify the sender at
>     Wipro or Mailadmin@wipro.com <ma...@wipro.com>
immediately
>     >and destroy all copies of this message and any attachments.
>     >
>     >
>
>




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Re: Tracking down duplicate ids

Posted by Richard Wallace <rw...@thewallacepack.net>.
After putting ids on all the elements in the tables (including 
<h:column>, <h:outputText> and <h:outputLink> elements) the problem 
seems to have gone away.

I think the element it was choking on was a link that was outside any 
forms.  So only parent it would have had was the <f:view> element.  That 
should be okay right? JSF elements don't all have to be within <h:form> 
elements do they?

Rich

Martin Marinschek wrote:

> The thing with the duplicate id's is only one possible reason.
>
> you should look at the component path that is indicated - according to 
> that, your component would need to be a top-level object - it does not 
> have any parent object at all?
>
> regards,
>
> Martin
>
> On 8/8/05, *Richard Wallace* <rwallace@thewallacepack.net 
> <ma...@thewallacepack.net>> wrote:
>
>     Ok, a bit of an update.  The issue only comes up when I have both
>     of the
>     tables on the same page.  If I comment one out with <%-- %> tags then
>     everything works fine when adding.  I can comment out either one
>     so it's
>     not a problem specific to just one of the tables, it's something about
>     having them both that is causing the problem.
>
>     Any ideas?
>
>     Thanks again,
>     Rich
>
>     Balaji Saranathan wrote:
>
>     >I'm not sure about the problem at your hand,
>     >But I have found it extremely helpful and clean in assigning the IDs
>     >myself to all the components in a page. It helps in debugging too.
>     >
>     >-----Original Message-----
>     >From: Richard Wallace [mailto: rwallace@thewallacepack.net
>     <ma...@thewallacepack.net>]
>     >Sent: Monday, August 08, 2005 2:58 PM
>     >To: MyFaces Discussion
>     >Subject: Tracking down duplicate ids
>     >
>     >
>     >Hey everybody,
>     >
>     >Got a nasty little problem that I'm not sure what the best way to go
>     >about solving it is.  I've got a page with a couple of dataTables
>     and a
>     >couple of forms on it.  One form and dataTable is for one type of
>     object
>     >
>     >and the other form and dataTable are for another type of object.  The
>     >forms are for adding new instances.
>     >
>     >The problem I'm running into is that after adding an instance of
>     either
>     >type I get these exceptions:
>     >
>     >javax.faces.FacesException: cannot add component with id '_id55' and
>     >path : {Component-Path : [Class:
>     >javax.faces.component.html.HtmlOutputText,Id: _id55]} to its parent
>     >component. This might be a problem due to duplicate ids.
>     >
>     >On most of the elements I'm just letting myfaces generate the ids, so
>     >I'm not sure how this is happening.  If I just goto the url directly
>     >after doing the add it works fine and the new entries are shown.
>     >
>     >What's the best way to track down what is actually causing
>     this?  Should
>     >
>     >I just start giving ids to all my jsf elements or what?
>     >
>     >Thanks,
>     >Rich
>     >
>     >
>     >
>     >
>     >Confidentiality Notice
>     >
>     >The information contained in this electronic message and any
>     attachments to this message are intended
>     >for the exclusive use of the addressee(s) and may contain
>     confidential or privileged information. If
>     >you are not the intended recipient, please notify the sender at
>     Wipro or Mailadmin@wipro.com <ma...@wipro.com> immediately
>     >and destroy all copies of this message and any attachments.
>     >
>     >
>
>


Re: Tracking down duplicate ids

Posted by Martin Marinschek <ma...@gmail.com>.
The thing with the duplicate id's is only one possible reason.

you should look at the component path that is indicated - according to that, 
your component would need to be a top-level object - it does not have any 
parent object at all?

regards,

Martin

On 8/8/05, Richard Wallace <rw...@thewallacepack.net> wrote:
> 
> Ok, a bit of an update. The issue only comes up when I have both of the
> tables on the same page. If I comment one out with <%-- %> tags then
> everything works fine when adding. I can comment out either one so it's
> not a problem specific to just one of the tables, it's something about
> having them both that is causing the problem.
> 
> Any ideas?
> 
> Thanks again,
> Rich
> 
> Balaji Saranathan wrote:
> 
> >I'm not sure about the problem at your hand,
> >But I have found it extremely helpful and clean in assigning the IDs
> >myself to all the components in a page. It helps in debugging too.
> >
> >-----Original Message-----
> >From: Richard Wallace [mailto:rwallace@thewallacepack.net]
> >Sent: Monday, August 08, 2005 2:58 PM
> >To: MyFaces Discussion
> >Subject: Tracking down duplicate ids
> >
> >
> >Hey everybody,
> >
> >Got a nasty little problem that I'm not sure what the best way to go
> >about solving it is. I've got a page with a couple of dataTables and a
> >couple of forms on it. One form and dataTable is for one type of object
> >
> >and the other form and dataTable are for another type of object. The
> >forms are for adding new instances.
> >
> >The problem I'm running into is that after adding an instance of either
> >type I get these exceptions:
> >
> >javax.faces.FacesException: cannot add component with id '_id55' and
> >path : {Component-Path : [Class:
> >javax.faces.component.html.HtmlOutputText,Id: _id55]} to its parent
> >component. This might be a problem due to duplicate ids.
> >
> >On most of the elements I'm just letting myfaces generate the ids, so
> >I'm not sure how this is happening. If I just goto the url directly
> >after doing the add it works fine and the new entries are shown.
> >
> >What's the best way to track down what is actually causing this? Should
> >
> >I just start giving ids to all my jsf elements or what?
> >
> >Thanks,
> >Rich
> >
> >
> >
> >
> >Confidentiality Notice
> >
> >The information contained in this electronic message and any attachments 
> to this message are intended
> >for the exclusive use of the addressee(s) and may contain confidential or 
> privileged information. If
> >you are not the intended recipient, please notify the sender at Wipro or 
> Mailadmin@wipro.com immediately
> >and destroy all copies of this message and any attachments.
> >
> >
> 
>

Re: Tracking down duplicate ids

Posted by Richard Wallace <rw...@thewallacepack.net>.
Ok, a bit of an update.  The issue only comes up when I have both of the 
tables on the same page.  If I comment one out with <%-- %> tags then 
everything works fine when adding.  I can comment out either one so it's 
not a problem specific to just one of the tables, it's something about 
having them both that is causing the problem.

Any ideas?

Thanks again,
Rich

Balaji Saranathan wrote:

>I'm not sure about the problem at your hand, 
>But I have found it extremely helpful and clean in assigning the IDs
>myself to all the components in a page. It helps in debugging too.
>
>-----Original Message-----
>From: Richard Wallace [mailto:rwallace@thewallacepack.net] 
>Sent: Monday, August 08, 2005 2:58 PM
>To: MyFaces Discussion
>Subject: Tracking down duplicate ids
>
>
>Hey everybody,
>
>Got a nasty little problem that I'm not sure what the best way to go 
>about solving it is.  I've got a page with a couple of dataTables and a 
>couple of forms on it.  One form and dataTable is for one type of object
>
>and the other form and dataTable are for another type of object.  The 
>forms are for adding new instances.
>
>The problem I'm running into is that after adding an instance of either 
>type I get these exceptions:
>
>javax.faces.FacesException: cannot add component with id '_id55' and 
>path : {Component-Path : [Class: 
>javax.faces.component.html.HtmlOutputText,Id: _id55]} to its parent 
>component. This might be a problem due to duplicate ids.
>
>On most of the elements I'm just letting myfaces generate the ids, so 
>I'm not sure how this is happening.  If I just goto the url directly 
>after doing the add it works fine and the new entries are shown.
>
>What's the best way to track down what is actually causing this?  Should
>
>I just start giving ids to all my jsf elements or what?
>
>Thanks,
>Rich
>
>
>
>
>Confidentiality Notice 
>
>The information contained in this electronic message and any attachments to this message are intended
>for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
>you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
>and destroy all copies of this message and any attachments.
>  
>


RE: Tracking down duplicate ids

Posted by Balaji Saranathan <ba...@wipro.com>.
I'm not sure about the problem at your hand, 
But I have found it extremely helpful and clean in assigning the IDs
myself to all the components in a page. It helps in debugging too.

-----Original Message-----
From: Richard Wallace [mailto:rwallace@thewallacepack.net] 
Sent: Monday, August 08, 2005 2:58 PM
To: MyFaces Discussion
Subject: Tracking down duplicate ids


Hey everybody,

Got a nasty little problem that I'm not sure what the best way to go 
about solving it is.  I've got a page with a couple of dataTables and a 
couple of forms on it.  One form and dataTable is for one type of object

and the other form and dataTable are for another type of object.  The 
forms are for adding new instances.

The problem I'm running into is that after adding an instance of either 
type I get these exceptions:

javax.faces.FacesException: cannot add component with id '_id55' and 
path : {Component-Path : [Class: 
javax.faces.component.html.HtmlOutputText,Id: _id55]} to its parent 
component. This might be a problem due to duplicate ids.

On most of the elements I'm just letting myfaces generate the ids, so 
I'm not sure how this is happening.  If I just goto the url directly 
after doing the add it works fine and the new entries are shown.

What's the best way to track down what is actually causing this?  Should

I just start giving ids to all my jsf elements or what?

Thanks,
Rich




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.