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* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> 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: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]
>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 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> immediately
>and destroy all copies of this message and any attachments.
>
>