You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Łukasz Budnik <lu...@gmail.com> on 2008/02/05 18:54:50 UTC

[Tomahawk] non-unique IDs in

Hi All,

I'm running a <t:tree2 /> example available at:
http://www.irian.at/myfacesexamples/tree2.jsf

And the result is:

javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
has already been found in the view.  See below for details.
+id: j_id_jsp_287013395_0
 type: javax.faces.component.UIViewRoot@ad89ec
  +id: treeForm
   type: javax.faces.component.html.HtmlForm@13a0934
    +id: clientTree
     type: org.apache.myfaces.custom.tree2.HtmlTree@1324b17
      +id: j_id_jsp_287013395_17
       type: javax.faces.component.html.HtmlPanelGroup@e00c09
        +id: j_id_jsp_287013395_18
         type: javax.faces.component.html.HtmlCommandLink@1364b53
          +id: j_id_jsp_287013395_19
           type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0

... and so on

the only id that I have set in my tree.jsp are:


<h:form id="treeForm">
  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
var="node" varNodeToggler="t">

...

the rest is simply copy and paste from the above mentioned web site.

I'm using:

myfaces-shared-tomahawk-3.0.1
tomahawk-1.1.7-SNAPSHOT

since all ids should be unique clearly this is... a bug?

best regards
Łukasz

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
You can have 1 or more facets. Each facet relates to a node type (not an
individual node). This way you can render a folder differently from a file.
So the answer is yes.

On Feb 8, 2008 4:04 PM, Łukasz Budnik <lu...@gmail.com> wrote:

> Hi Andrew,
>
> Sorry for bothering ;)
>
> I've made some progress and I can display it now.
>
> Last question.
>
> In the example from: http://www.irian.at/myfacesexamples/tree2.jsp.source
> there are defined 4 different <f:facet /> - for every node in tree.
>
> This can be troublesome if someone has a complex document.
>
> Can I define one facet for all non-leafs and one facet for leafs?
>
> best regards
> Łukasz
>
> On 07/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > I don't use JSTL, IMO JSTL and JSF should never be used together unless
> > there is an extremely good reason to do so.
> >
> > -Andrew
> >
> >
> > On Feb 6, 2008 2:51 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> >
> > > Hi Andrew,
> > >
> > > There is no t2c string in my source codes.
> > >
> > > Tell me, what JSTL do You use? I'm using default JSTL shipped with
> > Netbeans 6.0.
> > >
> > > Maybe JSTL is causing this error?
> > >
> > >
> > >
> > >
> > > best regards
> > > Łukasz
> > >
> > > On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > As far as I can see, t2c appears nowhere in the myfaces or tomahawk
> > code. It
> > > > seems like it is coming from your code.
> > > >
> > > > What are the results on a grep for t2c in all of your source code?
> > > >
> > > >
> > > >  On Feb 6, 2008 9:22 AM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > Hi Andrew,
> > > > >
> > > > > I'm using:
> > > > >
> > > > > myfaces-api-1.2.2 and myfaces-impl-1.2.2
> > > > >
> > > > > with:
> > > > >
> > > > >
> > > > > myfaces-shared-tomahawk-3.0.1
> > > > > tomahawk-1.1.7-SNAPSHOT
> > > > >
> > > > > best regards
> > > > > Łukasz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 06/02/2008, Andrew Robinson <an...@gmail.com>
> wrote:
> > > > > > That doesn't make much sense to me as generated IDs are in the
> form
> > of
> > > > > > "_id##", so t2c is not possible unless you or some code
> explicitly
> > sets
> > > > it
> > > > > > somewhere. What JSF impl version are you using.
> > > > > >
> > > > > > Also try grepping your code for t2c.
> > > > > >
> > > > > > -Andrew
> > > > > >
> > > > > >
> > > > > > On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com>
> > wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > My view code is simply copy & paste from:
> > > > > > >
> > http://www.irian.at/myfacesexamples/tree2.jsp.source
> > > > > > >
> > > > > > > and looks like this:
> > > > > > >
> > > > > > >
> > > > > > > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData
> }"
> > > > > > > var="node" varNodeToggler="t">
> > > > > > >                    <f:facet name="person">
> > > > > > >                        <h:panelGroup>
> > > > > > >                            <f:facet name="expand">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <f:facet name="collapse">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <h:outputText
> > value="#{node.description}"
> > > > > > > styleClass="nodeFolder"/>
> > > > > > >                        </h:panelGroup>
> > > > > > >                    </f:facet>
> > > > > > >                    <f:facet name="foo-folder">
> > > > > > >                        <h:panelGroup>
> > > > > > >                            <f:facet name="expand">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <f:facet name="collapse">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <h:outputText
> > value="#{node.description}"
> > > > > > > styleClass="nodeFolder"/>
> > > > > > >                            <h:outputText value="
> > > > > > > (#{node.childCount})" styleClass="childCount"
> rendered="#{!empty
> > > > > > > node.children}"/>
> > > > > > >                        </h:panelGroup>
> > > > > > >                    </f:facet>
> > > > > > >                    <f:facet name="bar-folder">
> > > > > > >                        <h:panelGroup>
> > > > > > >                            <f:facet name="expand">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/blue-folder-open.gif"
> > > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <f:facet name="collapse">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/blue-folder-closed.png"
> > > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > > >                            </f:facet>
> > > > > > >                            <h:outputText
> > value="#{node.description}"
> > > > > > > styleClass="nodeFolder"/>
> > > > > > >                            <h:outputText value="
> > > > > > > (#{node.childCount})" styleClass="childCount"
> rendered="#{!empty
> > > > > > > node.children}"/>
> > > > > > >                        </h:panelGroup>
> > > > > > >                    </f:facet>
> > > > > > >                    <f:facet name="document">
> > > > > > >                        <h:panelGroup>
> > > > > > >                            <h:commandLink immediate="true"
> > > > > > > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > > > > > > actionListener="#{t.setNodeSelected}">
> > > > > > >                                <t:graphicImage
> > > > > > > value="/images/tomahawk/document.png"
> > border="0"/>
> > > > > > >                                <h:outputText
> > > > value="#{node.description}"/>
> > > > > > >                                <f:param name="docNum"
> > > > > > > value="#{node.identifier}"/>
> > > > > > >                            </h:commandLink>
> > > > > > >                        </h:panelGroup>
> > > > > > >                    </f:facet>
> > > > > > >                </t:tree2>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > best regards
> > > > > > > Łukasz
> > > > > > >
> > > > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> > wrote:
> > > > > > > > Where is the view code?
> > > > > > > >
> > > > > > > >
> > > > > > > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <
> lukasz.budnik@gmail.com>
> > > > wrote:
> > > > > > > > > Sorry,
> > > > > > > > >
> > > > > > > > > this is full stack trace, the id treeForm:clientTree:t2c
> is
> > > > repeated 3
> > > > > > > > > times (I have highlighted it):
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > javax.servlet.ServletException: Component ID
> > > > treeForm:clientTree:t2c
> > > > > > > > > has already been found in the view.  See below for
> details.
> > > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > > >  type:
> > javax.faces.component.UIViewRoot@11bd9c9
> > > > > > > > >  +id: treeForm
> > > > > > > > >   type:
> > > > javax.faces.component.html.HtmlForm@17748d3
> > > > > > > > >    +id: clientTree
> > > > > > > > >     type:
> > > > > > org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > > > > > > >
> > > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > > >       type:
> > > > > > > >
> > javax.faces.component.html.HtmlPanelGroup@f268de
> > > > > > > > >
> > > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > > > > > > >
> > > > > > > > >        +id: j_id_jsp_287013395_19
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@1c5af2e
> > > > > > > > >        +id: j_id_jsp_287013395_20
> > > > > > > > >         type:
> > > > > > javax.faces.component.UIParameter@1702c48
> > > > > > > > >      +id: j_id_jsp_287013395_3
> > > > > > > > >       type:
> > > > > > > >
> > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > > > > > > >        +id: j_id_jsp_287013395_4
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > > > > > > >        +id: t2c
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > > > > > > >
> > > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > > >
> > > > > > > > >        +id: j_id_jsp_287013395_6
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@1d5b89c
> > > > > > > > >      +id: j_id_jsp_287013395_12
> > > > > > > > >       type:
> > > > > > > >
> > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > > > > > > >        +id: j_id_jsp_287013395_13
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > > > > > > >        +id: t2c
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > > > > > > >
> > > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > > >
> > > > > > > > >        +id: j_id_jsp_287013395_15
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > > > > > > >        +id: j_id_jsp_287013395_16
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@1664a9b
> > > > > > > > >      +id: j_id_jsp_287013395_7
> > > > > > > > >       type:
> > > > > > > >
> > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > > > > > > >        +id: j_id_jsp_287013395_8
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > > > > > > >        +id: t2c
> > > > > > > > >         type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > > > > > > >
> > > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > > >
> > > > > > > > >        +id: j_id_jsp_287013395_10
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@82d603
> > > > > > > > >        +id: j_id_jsp_287013395_11
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlOutputText@1b09282
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> ExtensionsFilter.java:147)
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(
> MonitorFilter.java:390)
> > > > > > > > >
> > > > > > > > > best regards
> > > > > > > > > Łukasz
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 05/02/2008, Andrew Robinson <
> andrew.rw.robinson@gmail.com>
> > > > wrote:
> > > > > > > > > > No this is right. Component IDs in "looping" components
> > should
> > > > > > always be
> > > > > > > > the
> > > > > > > > > > same. Client IDs change.
> > > > > > > > > >
> > > > > > > > > > Your example doesn't show t2c at all. Look for two
> > components it
> > > > > > your
> > > > > > > > page
> > > > > > > > > > that are under the tree and have t2c as their ID. Maybe
> you
> > > > thought
> > > > > > that
> > > > > > > > two
> > > > > > > > > > components could have the same ID in different facets?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik
> > <lu...@gmail.com>
> > > > > > wrote:
> > > > > > > > > > > Hi All,
> > > > > > > > > > >
> > > > > > > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > > > > > >
> > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > > > > > > >
> > > > > > > > > > > And the result is:
> > > > > > > > > > >
> > > > > > > > > > > javax.servlet.ServletException: Component ID
> > > > > > treeForm:clientTree:t2c
> > > > > > > > > > > has already been found in the view.  See below for
> > details.
> > > > > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > > > > >  type:
> > > > javax.faces.component.UIViewRoot@ad89ec
> > > > > > > > > > >  +id: treeForm
> > > > > > > > > > >   type:
> > > > > > javax.faces.component.html.HtmlForm@13a0934
> > > > > > > > > > >    +id: clientTree
> > > > > > > > > > >     type:
> > > > > > > > > >
> > > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > > > > >       type:
> > > > > > > > > >
> > > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > > > > >         type:
> > > > > > > > > >
> > > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > > > > > > >          +id: j_id_jsp_287013395_19
> > > > > > > > > > >           type:
> > > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > > > > > > >
> > > > > > > > > > > ... and so on
> > > > > > > > > > >
> > > > > > > > > > > the only id that I have set in my tree.jsp are:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > <h:form id="treeForm">
> > > > > > > > > > >  <t:tree2 id="clientTree"
> > > > value="#{Tree2TestController.treeData}"
> > > > > > > > > > > var="node" varNodeToggler="t">
> > > > > > > > > > >
> > > > > > > > > > > ...
> > > > > > > > > > >
> > > > > > > > > > > the rest is simply copy and paste from the above
> mentioned
> > web
> > > > > > site.
> > > > > > > > > > >
> > > > > > > > > > > I'm using:
> > > > > > > > > > >
> > > > > > > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > > > > > > >
> > > > > > > > > > > since all ids should be unique clearly this is... a
> bug?
> > > > > > > > > > >
> > > > > > > > > > > best regards
> > > > > > > > > > > Łukasz
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: [Tomahawk] non-unique IDs in

Posted by Łukasz Budnik <lu...@gmail.com>.
Hi Andrew,

Sorry for bothering ;)

I've made some progress and I can display it now.

Last question.

In the example from: http://www.irian.at/myfacesexamples/tree2.jsp.source
there are defined 4 different <f:facet /> - for every node in tree.

This can be troublesome if someone has a complex document.

Can I define one facet for all non-leafs and one facet for leafs?

best regards
Łukasz

On 07/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> I don't use JSTL, IMO JSTL and JSF should never be used together unless
> there is an extremely good reason to do so.
>
> -Andrew
>
>
> On Feb 6, 2008 2:51 PM, Łukasz Budnik <lu...@gmail.com> wrote:
>
> > Hi Andrew,
> >
> > There is no t2c string in my source codes.
> >
> > Tell me, what JSTL do You use? I'm using default JSTL shipped with
> Netbeans 6.0.
> >
> > Maybe JSTL is causing this error?
> >
> >
> >
> >
> > best regards
> > Łukasz
> >
> > On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > As far as I can see, t2c appears nowhere in the myfaces or tomahawk
> code. It
> > > seems like it is coming from your code.
> > >
> > > What are the results on a grep for t2c in all of your source code?
> > >
> > >
> > >  On Feb 6, 2008 9:22 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > > Hi Andrew,
> > > >
> > > > I'm using:
> > > >
> > > > myfaces-api-1.2.2 and myfaces-impl-1.2.2
> > > >
> > > > with:
> > > >
> > > >
> > > > myfaces-shared-tomahawk-3.0.1
> > > > tomahawk-1.1.7-SNAPSHOT
> > > >
> > > > best regards
> > > > Łukasz
> > > >
> > > >
> > > >
> > > >
> > > > On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > > That doesn't make much sense to me as generated IDs are in the form
> of
> > > > > "_id##", so t2c is not possible unless you or some code explicitly
> sets
> > > it
> > > > > somewhere. What JSF impl version are you using.
> > > > >
> > > > > Also try grepping your code for t2c.
> > > > >
> > > > > -Andrew
> > > > >
> > > > >
> > > > > On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > My view code is simply copy & paste from:
> > > > > >
> http://www.irian.at/myfacesexamples/tree2.jsp.source
> > > > > >
> > > > > > and looks like this:
> > > > > >
> > > > > >
> > > > > > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > > > var="node" varNodeToggler="t">
> > > > > >                    <f:facet name="person">
> > > > > >                        <h:panelGroup>
> > > > > >                            <f:facet name="expand">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <f:facet name="collapse">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <h:outputText
> value="#{node.description}"
> > > > > > styleClass="nodeFolder"/>
> > > > > >                        </h:panelGroup>
> > > > > >                    </f:facet>
> > > > > >                    <f:facet name="foo-folder">
> > > > > >                        <h:panelGroup>
> > > > > >                            <f:facet name="expand">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <f:facet name="collapse">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <h:outputText
> value="#{node.description}"
> > > > > > styleClass="nodeFolder"/>
> > > > > >                            <h:outputText value="
> > > > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > > > node.children}"/>
> > > > > >                        </h:panelGroup>
> > > > > >                    </f:facet>
> > > > > >                    <f:facet name="bar-folder">
> > > > > >                        <h:panelGroup>
> > > > > >                            <f:facet name="expand">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/blue-folder-open.gif"
> > > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <f:facet name="collapse">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/blue-folder-closed.png"
> > > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > > >                            </f:facet>
> > > > > >                            <h:outputText
> value="#{node.description}"
> > > > > > styleClass="nodeFolder"/>
> > > > > >                            <h:outputText value="
> > > > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > > > node.children}"/>
> > > > > >                        </h:panelGroup>
> > > > > >                    </f:facet>
> > > > > >                    <f:facet name="document">
> > > > > >                        <h:panelGroup>
> > > > > >                            <h:commandLink immediate="true"
> > > > > > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > > > > > actionListener="#{t.setNodeSelected}">
> > > > > >                                <t:graphicImage
> > > > > > value="/images/tomahawk/document.png"
> border="0"/>
> > > > > >                                <h:outputText
> > > value="#{node.description}"/>
> > > > > >                                <f:param name="docNum"
> > > > > > value="#{node.identifier}"/>
> > > > > >                            </h:commandLink>
> > > > > >                        </h:panelGroup>
> > > > > >                    </f:facet>
> > > > > >                </t:tree2>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > best regards
> > > > > > Łukasz
> > > > > >
> > > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> wrote:
> > > > > > > Where is the view code?
> > > > > > >
> > > > > > >
> > > > > > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com>
> > > wrote:
> > > > > > > > Sorry,
> > > > > > > >
> > > > > > > > this is full stack trace, the id treeForm:clientTree:t2c is
> > > repeated 3
> > > > > > > > times (I have highlighted it):
> > > > > > > >
> > > > > > > >
> > > > > > > > javax.servlet.ServletException: Component ID
> > > treeForm:clientTree:t2c
> > > > > > > > has already been found in the view.  See below for details.
> > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > >  type:
> javax.faces.component.UIViewRoot@11bd9c9
> > > > > > > >  +id: treeForm
> > > > > > > >   type:
> > > javax.faces.component.html.HtmlForm@17748d3
> > > > > > > >    +id: clientTree
> > > > > > > >     type:
> > > > > org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > > > > > >
> > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > >       type:
> > > > > > >
> javax.faces.component.html.HtmlPanelGroup@f268de
> > > > > > > >
> > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > > > > > >
> > > > > > > >        +id: j_id_jsp_287013395_19
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@1c5af2e
> > > > > > > >        +id: j_id_jsp_287013395_20
> > > > > > > >         type:
> > > > > javax.faces.component.UIParameter@1702c48
> > > > > > > >      +id: j_id_jsp_287013395_3
> > > > > > > >       type:
> > > > > > >
> javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > > > > > >        +id: j_id_jsp_287013395_4
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > > > > > >        +id: t2c
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > > > > > >
> > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > >
> > > > > > > >        +id: j_id_jsp_287013395_6
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@1d5b89c
> > > > > > > >      +id: j_id_jsp_287013395_12
> > > > > > > >       type:
> > > > > > >
> javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > > > > > >        +id: j_id_jsp_287013395_13
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > > > > > >        +id: t2c
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > > > > > >
> > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > >
> > > > > > > >        +id: j_id_jsp_287013395_15
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > > > > > >        +id: j_id_jsp_287013395_16
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@1664a9b
> > > > > > > >      +id: j_id_jsp_287013395_7
> > > > > > > >       type:
> > > > > > >
> javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > > > > > >        +id: j_id_jsp_287013395_8
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > > > > > >        +id: t2c
> > > > > > > >         type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > > > > > >
> > > > > > > > ^^^^^^^^^^^^^^
> > > > > > > >
> > > > > > > >        +id: j_id_jsp_287013395_10
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@82d603
> > > > > > > >        +id: j_id_jsp_287013395_11
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlOutputText@1b09282
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > > > > > >
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> > > > > > > >
> > > > > > >
> > > > >
> > >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> > > > > > > >
> > > > > > > > best regards
> > > > > > > > Łukasz
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> > > wrote:
> > > > > > > > > No this is right. Component IDs in "looping" components
> should
> > > > > always be
> > > > > > > the
> > > > > > > > > same. Client IDs change.
> > > > > > > > >
> > > > > > > > > Your example doesn't show t2c at all. Look for two
> components it
> > > > > your
> > > > > > > page
> > > > > > > > > that are under the tree and have t2c as their ID. Maybe you
> > > thought
> > > > > that
> > > > > > > two
> > > > > > > > > components could have the same ID in different facets?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik
> <lu...@gmail.com>
> > > > > wrote:
> > > > > > > > > > Hi All,
> > > > > > > > > >
> > > > > > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > > > > >
> http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > > > > > >
> > > > > > > > > > And the result is:
> > > > > > > > > >
> > > > > > > > > > javax.servlet.ServletException: Component ID
> > > > > treeForm:clientTree:t2c
> > > > > > > > > > has already been found in the view.  See below for
> details.
> > > > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > > > >  type:
> > > javax.faces.component.UIViewRoot@ad89ec
> > > > > > > > > >  +id: treeForm
> > > > > > > > > >   type:
> > > > > javax.faces.component.html.HtmlForm@13a0934
> > > > > > > > > >    +id: clientTree
> > > > > > > > > >     type:
> > > > > > > > >
> > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > > > >       type:
> > > > > > > > >
> > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > > > >         type:
> > > > > > > > >
> > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > > > > > >          +id: j_id_jsp_287013395_19
> > > > > > > > > >           type:
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > > > > > >
> > > > > > > > > > ... and so on
> > > > > > > > > >
> > > > > > > > > > the only id that I have set in my tree.jsp are:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > <h:form id="treeForm">
> > > > > > > > > >  <t:tree2 id="clientTree"
> > > value="#{Tree2TestController.treeData}"
> > > > > > > > > > var="node" varNodeToggler="t">
> > > > > > > > > >
> > > > > > > > > > ...
> > > > > > > > > >
> > > > > > > > > > the rest is simply copy and paste from the above mentioned
> web
> > > > > site.
> > > > > > > > > >
> > > > > > > > > > I'm using:
> > > > > > > > > >
> > > > > > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > > > > > >
> > > > > > > > > > since all ids should be unique clearly this is... a bug?
> > > > > > > > > >
> > > > > > > > > > best regards
> > > > > > > > > > Łukasz
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
I don't use JSTL, IMO JSTL and JSF should never be used together unless
there is an extremely good reason to do so.

-Andrew

On Feb 6, 2008 2:51 PM, Łukasz Budnik <lu...@gmail.com> wrote:

> Hi Andrew,
>
> There is no t2c string in my source codes.
>
> Tell me, what JSTL do You use? I'm using default JSTL shipped with
> Netbeans 6.0.
>
> Maybe JSTL is causing this error?
>
> best regards
> Łukasz
>
> On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > As far as I can see, t2c appears nowhere in the myfaces or tomahawk
> code. It
> > seems like it is coming from your code.
> >
> > What are the results on a grep for t2c in all of your source code?
> >
> >
> >  On Feb 6, 2008 9:22 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > Hi Andrew,
> > >
> > > I'm using:
> > >
> > > myfaces-api-1.2.2 and myfaces-impl-1.2.2
> > >
> > > with:
> > >
> > >
> > > myfaces-shared-tomahawk-3.0.1
> > > tomahawk-1.1.7-SNAPSHOT
> > >
> > > best regards
> > > Łukasz
> > >
> > >
> > >
> > >
> > > On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > That doesn't make much sense to me as generated IDs are in the form
> of
> > > > "_id##", so t2c is not possible unless you or some code explicitly
> sets
> > it
> > > > somewhere. What JSF impl version are you using.
> > > >
> > > > Also try grepping your code for t2c.
> > > >
> > > > -Andrew
> > > >
> > > >
> > > > On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > Hi,
> > > > >
> > > > > My view code is simply copy & paste from:
> > > > > http://www.irian.at/myfacesexamples/tree2.jsp.source
> > > > >
> > > > > and looks like this:
> > > > >
> > > > >
> > > > > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > > var="node" varNodeToggler="t">
> > > > >                    <f:facet name="person">
> > > > >                        <h:panelGroup>
> > > > >                            <f:facet name="expand">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <f:facet name="collapse">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <h:outputText value="#{node.description
> }"
> > > > > styleClass="nodeFolder"/>
> > > > >                        </h:panelGroup>
> > > > >                    </f:facet>
> > > > >                    <f:facet name="foo-folder">
> > > > >                        <h:panelGroup>
> > > > >                            <f:facet name="expand">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <f:facet name="collapse">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <h:outputText value="#{node.description
> }"
> > > > > styleClass="nodeFolder"/>
> > > > >                            <h:outputText value="
> > > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > > node.children}"/>
> > > > >                        </h:panelGroup>
> > > > >                    </f:facet>
> > > > >                    <f:facet name="bar-folder">
> > > > >                        <h:panelGroup>
> > > > >                            <f:facet name="expand">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/blue-folder-open.gif"
> > > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <f:facet name="collapse">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/blue-folder-closed.png"
> > > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > > >                            </f:facet>
> > > > >                            <h:outputText value="#{node.description
> }"
> > > > > styleClass="nodeFolder"/>
> > > > >                            <h:outputText value="
> > > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > > node.children}"/>
> > > > >                        </h:panelGroup>
> > > > >                    </f:facet>
> > > > >                    <f:facet name="document">
> > > > >                        <h:panelGroup>
> > > > >                            <h:commandLink immediate="true"
> > > > > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > > > > actionListener="#{t.setNodeSelected}">
> > > > >                                <t:graphicImage
> > > > > value="/images/tomahawk/document.png" border="0"/>
> > > > >                                <h:outputText
> > value="#{node.description}"/>
> > > > >                                <f:param name="docNum"
> > > > > value="#{node.identifier}"/>
> > > > >                            </h:commandLink>
> > > > >                        </h:panelGroup>
> > > > >                    </f:facet>
> > > > >                </t:tree2>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > best regards
> > > > > Łukasz
> > > > >
> > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> wrote:
> > > > > > Where is the view code?
> > > > > >
> > > > > >
> > > > > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com>
> > wrote:
> > > > > > > Sorry,
> > > > > > >
> > > > > > > this is full stack trace, the id treeForm:clientTree:t2c is
> > repeated 3
> > > > > > > times (I have highlighted it):
> > > > > > >
> > > > > > >
> > > > > > > javax.servlet.ServletException: Component ID
> > treeForm:clientTree:t2c
> > > > > > > has already been found in the view.  See below for details.
> > > > > > > +id: j_id_jsp_287013395_0
> > > > > > >  type: javax.faces.component.UIViewRoot@11bd9c9
> > > > > > >  +id: treeForm
> > > > > > >   type:
> > javax.faces.component.html.HtmlForm@17748d3
> > > > > > >    +id: clientTree
> > > > > > >     type:
> > > > org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > > > > >
> > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > >       type:
> > > > > > javax.faces.component.html.HtmlPanelGroup@f268de
> > > > > > >
> > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > > > > >
> > > > > > >        +id: j_id_jsp_287013395_19
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@1c5af2e
> > > > > > >        +id: j_id_jsp_287013395_20
> > > > > > >         type:
> > > > javax.faces.component.UIParameter@1702c48
> > > > > > >      +id: j_id_jsp_287013395_3
> > > > > > >       type:
> > > > > > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > > > > >        +id: j_id_jsp_287013395_4
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > > > > >        +id: t2c
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > > > > >
> > > > > > > ^^^^^^^^^^^^^^
> > > > > > >
> > > > > > >        +id: j_id_jsp_287013395_6
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@1d5b89c
> > > > > > >      +id: j_id_jsp_287013395_12
> > > > > > >       type:
> > > > > > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > > > > >        +id: j_id_jsp_287013395_13
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > > > > >        +id: t2c
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > > > > >
> > > > > > > ^^^^^^^^^^^^^^
> > > > > > >
> > > > > > >        +id: j_id_jsp_287013395_15
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > > > > >        +id: j_id_jsp_287013395_16
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@1664a9b
> > > > > > >      +id: j_id_jsp_287013395_7
> > > > > > >       type:
> > > > > > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > > > > >        +id: j_id_jsp_287013395_8
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > > > > >        +id: t2c
> > > > > > >         type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > > > > >
> > > > > > > ^^^^^^^^^^^^^^
> > > > > > >
> > > > > > >        +id: j_id_jsp_287013395_10
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@82d603
> > > > > > >        +id: j_id_jsp_287013395_11
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlOutputText@1b09282
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> ExtensionsFilter.java:147)
> > > > > > >
> > > > > >
> > > >
> > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(
> MonitorFilter.java:390)
> > > > > > >
> > > > > > > best regards
> > > > > > > Łukasz
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> > wrote:
> > > > > > > > No this is right. Component IDs in "looping" components
> should
> > > > always be
> > > > > > the
> > > > > > > > same. Client IDs change.
> > > > > > > >
> > > > > > > > Your example doesn't show t2c at all. Look for two
> components it
> > > > your
> > > > > > page
> > > > > > > > that are under the tree and have t2c as their ID. Maybe you
> > thought
> > > > that
> > > > > > two
> > > > > > > > components could have the same ID in different facets?
> > > > > > > >
> > > > > > > >
> > > > > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <
> lukasz.budnik@gmail.com>
> > > > wrote:
> > > > > > > > > Hi All,
> > > > > > > > >
> > > > > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > > > > >
> > > > > > > > > And the result is:
> > > > > > > > >
> > > > > > > > > javax.servlet.ServletException: Component ID
> > > > treeForm:clientTree:t2c
> > > > > > > > > has already been found in the view.  See below for
> details.
> > > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > > >  type:
> > javax.faces.component.UIViewRoot@ad89ec
> > > > > > > > >  +id: treeForm
> > > > > > > > >   type:
> > > > javax.faces.component.html.HtmlForm@13a0934
> > > > > > > > >    +id: clientTree
> > > > > > > > >     type:
> > > > > > > >
> > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > > >       type:
> > > > > > > >
> > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > > >         type:
> > > > > > > >
> > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > > > > >          +id: j_id_jsp_287013395_19
> > > > > > > > >           type:
> > > > > > > >
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > > > > >
> > > > > > > > > ... and so on
> > > > > > > > >
> > > > > > > > > the only id that I have set in my tree.jsp are:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > <h:form id="treeForm">
> > > > > > > > >  <t:tree2 id="clientTree"
> > value="#{Tree2TestController.treeData}"
> > > > > > > > > var="node" varNodeToggler="t">
> > > > > > > > >
> > > > > > > > > ...
> > > > > > > > >
> > > > > > > > > the rest is simply copy and paste from the above mentioned
> web
> > > > site.
> > > > > > > > >
> > > > > > > > > I'm using:
> > > > > > > > >
> > > > > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > > > > >
> > > > > > > > > since all ids should be unique clearly this is... a bug?
> > > > > > > > >
> > > > > > > > > best regards
> > > > > > > > > Łukasz
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: [Tomahawk] non-unique IDs in

Posted by Łukasz Budnik <lu...@gmail.com>.
Hi Andrew,

There is no t2c string in my source codes.

Tell me, what JSTL do You use? I'm using default JSTL shipped with Netbeans 6.0.

Maybe JSTL is causing this error?

best regards
Łukasz

On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> As far as I can see, t2c appears nowhere in the myfaces or tomahawk code. It
> seems like it is coming from your code.
>
> What are the results on a grep for t2c in all of your source code?
>
>
>  On Feb 6, 2008 9:22 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > Hi Andrew,
> >
> > I'm using:
> >
> > myfaces-api-1.2.2 and myfaces-impl-1.2.2
> >
> > with:
> >
> >
> > myfaces-shared-tomahawk-3.0.1
> > tomahawk-1.1.7-SNAPSHOT
> >
> > best regards
> > Łukasz
> >
> >
> >
> >
> > On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > That doesn't make much sense to me as generated IDs are in the form of
> > > "_id##", so t2c is not possible unless you or some code explicitly sets
> it
> > > somewhere. What JSF impl version are you using.
> > >
> > > Also try grepping your code for t2c.
> > >
> > > -Andrew
> > >
> > >
> > > On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > My view code is simply copy & paste from:
> > > > http://www.irian.at/myfacesexamples/tree2.jsp.source
> > > >
> > > > and looks like this:
> > > >
> > > >
> > > > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > var="node" varNodeToggler="t">
> > > >                    <f:facet name="person">
> > > >                        <h:panelGroup>
> > > >                            <f:facet name="expand">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <f:facet name="collapse">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <h:outputText value="#{node.description}"
> > > > styleClass="nodeFolder"/>
> > > >                        </h:panelGroup>
> > > >                    </f:facet>
> > > >                    <f:facet name="foo-folder">
> > > >                        <h:panelGroup>
> > > >                            <f:facet name="expand">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/yellow-folder-open.png"
> > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <f:facet name="collapse">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/yellow-folder-closed.png"
> > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <h:outputText value="#{node.description}"
> > > > styleClass="nodeFolder"/>
> > > >                            <h:outputText value="
> > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > node.children}"/>
> > > >                        </h:panelGroup>
> > > >                    </f:facet>
> > > >                    <f:facet name="bar-folder">
> > > >                        <h:panelGroup>
> > > >                            <f:facet name="expand">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/blue-folder-open.gif"
> > > > rendered="#{t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <f:facet name="collapse">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/blue-folder-closed.png"
> > > > rendered="#{!t.nodeExpanded}" border="0"/>
> > > >                            </f:facet>
> > > >                            <h:outputText value="#{node.description}"
> > > > styleClass="nodeFolder"/>
> > > >                            <h:outputText value="
> > > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > > node.children}"/>
> > > >                        </h:panelGroup>
> > > >                    </f:facet>
> > > >                    <f:facet name="document">
> > > >                        <h:panelGroup>
> > > >                            <h:commandLink immediate="true"
> > > > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > > > actionListener="#{t.setNodeSelected}">
> > > >                                <t:graphicImage
> > > > value="/images/tomahawk/document.png" border="0"/>
> > > >                                <h:outputText
> value="#{node.description}"/>
> > > >                                <f:param name="docNum"
> > > > value="#{node.identifier}"/>
> > > >                            </h:commandLink>
> > > >                        </h:panelGroup>
> > > >                    </f:facet>
> > > >                </t:tree2>
> > > >
> > > >
> > > >
> > > >
> > > > best regards
> > > > Łukasz
> > > >
> > > > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > > Where is the view code?
> > > > >
> > > > >
> > > > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > > Sorry,
> > > > > >
> > > > > > this is full stack trace, the id treeForm:clientTree:t2c is
> repeated 3
> > > > > > times (I have highlighted it):
> > > > > >
> > > > > >
> > > > > > javax.servlet.ServletException: Component ID
> treeForm:clientTree:t2c
> > > > > > has already been found in the view.  See below for details.
> > > > > > +id: j_id_jsp_287013395_0
> > > > > >  type: javax.faces.component.UIViewRoot@11bd9c9
> > > > > >  +id: treeForm
> > > > > >   type:
> javax.faces.component.html.HtmlForm@17748d3
> > > > > >    +id: clientTree
> > > > > >     type:
> > > org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > > > >
> > > > > >      +id: j_id_jsp_287013395_17
> > > > > >       type:
> > > > > javax.faces.component.html.HtmlPanelGroup@f268de
> > > > > >
> > > > > >        +id: j_id_jsp_287013395_18
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > > > >
> > > > > >        +id: j_id_jsp_287013395_19
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@1c5af2e
> > > > > >        +id: j_id_jsp_287013395_20
> > > > > >         type:
> > > javax.faces.component.UIParameter@1702c48
> > > > > >      +id: j_id_jsp_287013395_3
> > > > > >       type:
> > > > > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > > > >        +id: j_id_jsp_287013395_4
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > > > >        +id: t2c
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > > > >
> > > > > > ^^^^^^^^^^^^^^
> > > > > >
> > > > > >        +id: j_id_jsp_287013395_6
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@1d5b89c
> > > > > >      +id: j_id_jsp_287013395_12
> > > > > >       type:
> > > > > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > > > >        +id: j_id_jsp_287013395_13
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > > > >        +id: t2c
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > > > >
> > > > > > ^^^^^^^^^^^^^^
> > > > > >
> > > > > >        +id: j_id_jsp_287013395_15
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > > > >        +id: j_id_jsp_287013395_16
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@1664a9b
> > > > > >      +id: j_id_jsp_287013395_7
> > > > > >       type:
> > > > > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > > > >        +id: j_id_jsp_287013395_8
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > > > >        +id: t2c
> > > > > >         type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > > > >
> > > > > > ^^^^^^^^^^^^^^
> > > > > >
> > > > > >        +id: j_id_jsp_287013395_10
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@82d603
> > > > > >        +id: j_id_jsp_287013395_11
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlOutputText@1b09282
> > > > > >
> > > > > >
> > > > >
> > >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > > > >
> > > > >
> > >
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> > > > > >
> > > > >
> > >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> > > > > >
> > > > > > best regards
> > > > > > Łukasz
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> wrote:
> > > > > > > No this is right. Component IDs in "looping" components should
> > > always be
> > > > > the
> > > > > > > same. Client IDs change.
> > > > > > >
> > > > > > > Your example doesn't show t2c at all. Look for two components it
> > > your
> > > > > page
> > > > > > > that are under the tree and have t2c as their ID. Maybe you
> thought
> > > that
> > > > > two
> > > > > > > components could have the same ID in different facets?
> > > > > > >
> > > > > > >
> > > > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com>
> > > wrote:
> > > > > > > > Hi All,
> > > > > > > >
> > > > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > > > >
> > > > > > > > And the result is:
> > > > > > > >
> > > > > > > > javax.servlet.ServletException: Component ID
> > > treeForm:clientTree:t2c
> > > > > > > > has already been found in the view.  See below for details.
> > > > > > > > +id: j_id_jsp_287013395_0
> > > > > > > >  type:
> javax.faces.component.UIViewRoot@ad89ec
> > > > > > > >  +id: treeForm
> > > > > > > >   type:
> > > javax.faces.component.html.HtmlForm@13a0934
> > > > > > > >    +id: clientTree
> > > > > > > >     type:
> > > > > > >
> org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > > >       type:
> > > > > > >
> javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > > >         type:
> > > > > > >
> javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > > > >          +id: j_id_jsp_287013395_19
> > > > > > > >           type:
> > > > > > >
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > > > >
> > > > > > > > ... and so on
> > > > > > > >
> > > > > > > > the only id that I have set in my tree.jsp are:
> > > > > > > >
> > > > > > > >
> > > > > > > > <h:form id="treeForm">
> > > > > > > >  <t:tree2 id="clientTree"
> value="#{Tree2TestController.treeData}"
> > > > > > > > var="node" varNodeToggler="t">
> > > > > > > >
> > > > > > > > ...
> > > > > > > >
> > > > > > > > the rest is simply copy and paste from the above mentioned web
> > > site.
> > > > > > > >
> > > > > > > > I'm using:
> > > > > > > >
> > > > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > > > >
> > > > > > > > since all ids should be unique clearly this is... a bug?
> > > > > > > >
> > > > > > > > best regards
> > > > > > > > Łukasz
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
As far as I can see, t2c appears nowhere in the myfaces or tomahawk code. It
seems like it is coming from your code.

What are the results on a grep for t2c in all of your source code?

On Feb 6, 2008 9:22 AM, Łukasz Budnik <lu...@gmail.com> wrote:

> Hi Andrew,
>
> I'm using:
>
> myfaces-api-1.2.2 and myfaces-impl-1.2.2
>
> with:
>
> myfaces-shared-tomahawk-3.0.1
> tomahawk-1.1.7-SNAPSHOT
>
> best regards
> Łukasz
>
> On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > That doesn't make much sense to me as generated IDs are in the form of
> > "_id##", so t2c is not possible unless you or some code explicitly sets
> it
> > somewhere. What JSF impl version are you using.
> >
> > Also try grepping your code for t2c.
> >
> > -Andrew
> >
> >
> > On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > Hi,
> > >
> > > My view code is simply copy & paste from:
> > > http://www.irian.at/myfacesexamples/tree2.jsp.source
> > >
> > > and looks like this:
> > >
> > >
> > > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > var="node" varNodeToggler="t">
> > >                    <f:facet name="person">
> > >                        <h:panelGroup>
> > >                            <f:facet name="expand">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/yellow-folder-open.png"
> > > rendered="#{t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <f:facet name="collapse">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/yellow-folder-closed.png"
> > > rendered="#{!t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <h:outputText value="#{node.description}"
> > > styleClass="nodeFolder"/>
> > >                        </h:panelGroup>
> > >                    </f:facet>
> > >                    <f:facet name="foo-folder">
> > >                        <h:panelGroup>
> > >                            <f:facet name="expand">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/yellow-folder-open.png"
> > > rendered="#{t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <f:facet name="collapse">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/yellow-folder-closed.png"
> > > rendered="#{!t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <h:outputText value="#{node.description}"
> > > styleClass="nodeFolder"/>
> > >                            <h:outputText value="
> > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > node.children}"/>
> > >                        </h:panelGroup>
> > >                    </f:facet>
> > >                    <f:facet name="bar-folder">
> > >                        <h:panelGroup>
> > >                            <f:facet name="expand">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/blue-folder-open.gif"
> > > rendered="#{t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <f:facet name="collapse">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/blue-folder-closed.png"
> > > rendered="#{!t.nodeExpanded}" border="0"/>
> > >                            </f:facet>
> > >                            <h:outputText value="#{node.description}"
> > > styleClass="nodeFolder"/>
> > >                            <h:outputText value="
> > > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > > node.children}"/>
> > >                        </h:panelGroup>
> > >                    </f:facet>
> > >                    <f:facet name="document">
> > >                        <h:panelGroup>
> > >                            <h:commandLink immediate="true"
> > > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > > actionListener="#{t.setNodeSelected}">
> > >                                <t:graphicImage
> > > value="/images/tomahawk/document.png" border="0"/>
> > >                                <h:outputText value="#{node.description
> }"/>
> > >                                <f:param name="docNum"
> > > value="#{node.identifier}"/>
> > >                            </h:commandLink>
> > >                        </h:panelGroup>
> > >                    </f:facet>
> > >                </t:tree2>
> > >
> > >
> > >
> > >
> > > best regards
> > > Łukasz
> > >
> > > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > Where is the view code?
> > > >
> > > >
> > > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > Sorry,
> > > > >
> > > > > this is full stack trace, the id treeForm:clientTree:t2c is
> repeated 3
> > > > > times (I have highlighted it):
> > > > >
> > > > >
> > > > > javax.servlet.ServletException: Component ID
> treeForm:clientTree:t2c
> > > > > has already been found in the view.  See below for details.
> > > > > +id: j_id_jsp_287013395_0
> > > > >  type: javax.faces.component.UIViewRoot@11bd9c9
> > > > >  +id: treeForm
> > > > >   type: javax.faces.component.html.HtmlForm@17748d3
> > > > >    +id: clientTree
> > > > >     type:
> > org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > > >
> > > > >      +id: j_id_jsp_287013395_17
> > > > >       type:
> > > > javax.faces.component.html.HtmlPanelGroup@f268de
> > > > >
> > > > >        +id: j_id_jsp_287013395_18
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > > >
> > > > >        +id: j_id_jsp_287013395_19
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@1c5af2e
> > > > >        +id: j_id_jsp_287013395_20
> > > > >         type:
> > javax.faces.component.UIParameter@1702c48
> > > > >      +id: j_id_jsp_287013395_3
> > > > >       type:
> > > > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > > >        +id: j_id_jsp_287013395_4
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > > >        +id: t2c
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > > >
> > > > > ^^^^^^^^^^^^^^
> > > > >
> > > > >        +id: j_id_jsp_287013395_6
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@1d5b89c
> > > > >      +id: j_id_jsp_287013395_12
> > > > >       type:
> > > > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > > >        +id: j_id_jsp_287013395_13
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > > >        +id: t2c
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > > >
> > > > > ^^^^^^^^^^^^^^
> > > > >
> > > > >        +id: j_id_jsp_287013395_15
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > > >        +id: j_id_jsp_287013395_16
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@1664a9b
> > > > >      +id: j_id_jsp_287013395_7
> > > > >       type:
> > > > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > > >        +id: j_id_jsp_287013395_8
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > > >        +id: t2c
> > > > >         type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > > >
> > > > > ^^^^^^^^^^^^^^
> > > > >
> > > > >        +id: j_id_jsp_287013395_10
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@82d603
> > > > >        +id: j_id_jsp_287013395_11
> > > > >         type:
> > > > javax.faces.component.html.HtmlOutputText@1b09282
> > > > >
> > > > >
> > > >
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > > >
> > > >
> > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> ExtensionsFilter.java:147)
> > > > >
> > > >
> > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(
> MonitorFilter.java:390)
> > > > >
> > > > > best regards
> > > > > Łukasz
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 05/02/2008, Andrew Robinson <an...@gmail.com>
> wrote:
> > > > > > No this is right. Component IDs in "looping" components should
> > always be
> > > > the
> > > > > > same. Client IDs change.
> > > > > >
> > > > > > Your example doesn't show t2c at all. Look for two components it
> > your
> > > > page
> > > > > > that are under the tree and have t2c as their ID. Maybe you
> thought
> > that
> > > > two
> > > > > > components could have the same ID in different facets?
> > > > > >
> > > > > >
> > > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com>
> > wrote:
> > > > > > > Hi All,
> > > > > > >
> > > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > > >
> > > > > > > And the result is:
> > > > > > >
> > > > > > > javax.servlet.ServletException: Component ID
> > treeForm:clientTree:t2c
> > > > > > > has already been found in the view.  See below for details.
> > > > > > > +id: j_id_jsp_287013395_0
> > > > > > >  type: javax.faces.component.UIViewRoot@ad89ec
> > > > > > >  +id: treeForm
> > > > > > >   type:
> > javax.faces.component.html.HtmlForm@13a0934
> > > > > > >    +id: clientTree
> > > > > > >     type:
> > > > > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > > >      +id: j_id_jsp_287013395_17
> > > > > > >       type:
> > > > > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > > >        +id: j_id_jsp_287013395_18
> > > > > > >         type:
> > > > > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > > >          +id: j_id_jsp_287013395_19
> > > > > > >           type:
> > > > > >
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > > >
> > > > > > > ... and so on
> > > > > > >
> > > > > > > the only id that I have set in my tree.jsp are:
> > > > > > >
> > > > > > >
> > > > > > > <h:form id="treeForm">
> > > > > > >  <t:tree2 id="clientTree" value="#{
> Tree2TestController.treeData}"
> > > > > > > var="node" varNodeToggler="t">
> > > > > > >
> > > > > > > ...
> > > > > > >
> > > > > > > the rest is simply copy and paste from the above mentioned web
> > site.
> > > > > > >
> > > > > > > I'm using:
> > > > > > >
> > > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > > >
> > > > > > > since all ids should be unique clearly this is... a bug?
> > > > > > >
> > > > > > > best regards
> > > > > > > Łukasz
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: [Tomahawk] non-unique IDs in

Posted by Łukasz Budnik <lu...@gmail.com>.
Hi Andrew,

I'm using:

myfaces-api-1.2.2 and myfaces-impl-1.2.2

with:

myfaces-shared-tomahawk-3.0.1
tomahawk-1.1.7-SNAPSHOT

best regards
Łukasz

On 06/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> That doesn't make much sense to me as generated IDs are in the form of
> "_id##", so t2c is not possible unless you or some code explicitly sets it
> somewhere. What JSF impl version are you using.
>
> Also try grepping your code for t2c.
>
> -Andrew
>
>
> On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > Hi,
> >
> > My view code is simply copy & paste from:
> > http://www.irian.at/myfacesexamples/tree2.jsp.source
> >
> > and looks like this:
> >
> >
> > <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > var="node" varNodeToggler="t">
> >                    <f:facet name="person">
> >                        <h:panelGroup>
> >                            <f:facet name="expand">
> >                                <t:graphicImage
> > value="/images/tomahawk/yellow-folder-open.png"
> > rendered="#{t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <f:facet name="collapse">
> >                                <t:graphicImage
> > value="/images/tomahawk/yellow-folder-closed.png"
> > rendered="#{!t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <h:outputText value="#{node.description}"
> > styleClass="nodeFolder"/>
> >                        </h:panelGroup>
> >                    </f:facet>
> >                    <f:facet name="foo-folder">
> >                        <h:panelGroup>
> >                            <f:facet name="expand">
> >                                <t:graphicImage
> > value="/images/tomahawk/yellow-folder-open.png"
> > rendered="#{t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <f:facet name="collapse">
> >                                <t:graphicImage
> > value="/images/tomahawk/yellow-folder-closed.png"
> > rendered="#{!t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <h:outputText value="#{node.description}"
> > styleClass="nodeFolder"/>
> >                            <h:outputText value="
> > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > node.children}"/>
> >                        </h:panelGroup>
> >                    </f:facet>
> >                    <f:facet name="bar-folder">
> >                        <h:panelGroup>
> >                            <f:facet name="expand">
> >                                <t:graphicImage
> > value="/images/tomahawk/blue-folder-open.gif"
> > rendered="#{t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <f:facet name="collapse">
> >                                <t:graphicImage
> > value="/images/tomahawk/blue-folder-closed.png"
> > rendered="#{!t.nodeExpanded}" border="0"/>
> >                            </f:facet>
> >                            <h:outputText value="#{node.description}"
> > styleClass="nodeFolder"/>
> >                            <h:outputText value="
> > (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> > node.children}"/>
> >                        </h:panelGroup>
> >                    </f:facet>
> >                    <f:facet name="document">
> >                        <h:panelGroup>
> >                            <h:commandLink immediate="true"
> > styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> > actionListener="#{t.setNodeSelected}">
> >                                <t:graphicImage
> > value="/images/tomahawk/document.png" border="0"/>
> >                                <h:outputText value="#{node.description}"/>
> >                                <f:param name="docNum"
> > value="#{node.identifier}"/>
> >                            </h:commandLink>
> >                        </h:panelGroup>
> >                    </f:facet>
> >                </t:tree2>
> >
> >
> >
> >
> > best regards
> > Łukasz
> >
> > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > Where is the view code?
> > >
> > >
> > > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > > Sorry,
> > > >
> > > > this is full stack trace, the id treeForm:clientTree:t2c is repeated 3
> > > > times (I have highlighted it):
> > > >
> > > >
> > > > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > > > has already been found in the view.  See below for details.
> > > > +id: j_id_jsp_287013395_0
> > > >  type: javax.faces.component.UIViewRoot@11bd9c9
> > > >  +id: treeForm
> > > >   type: javax.faces.component.html.HtmlForm@17748d3
> > > >    +id: clientTree
> > > >     type:
> org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > > >
> > > >      +id: j_id_jsp_287013395_17
> > > >       type:
> > > javax.faces.component.html.HtmlPanelGroup@f268de
> > > >
> > > >        +id: j_id_jsp_287013395_18
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > > >
> > > >        +id: j_id_jsp_287013395_19
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@1c5af2e
> > > >        +id: j_id_jsp_287013395_20
> > > >         type:
> javax.faces.component.UIParameter@1702c48
> > > >      +id: j_id_jsp_287013395_3
> > > >       type:
> > > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > > >        +id: j_id_jsp_287013395_4
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > > >        +id: t2c
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > > >
> > > > ^^^^^^^^^^^^^^
> > > >
> > > >        +id: j_id_jsp_287013395_6
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@1d5b89c
> > > >      +id: j_id_jsp_287013395_12
> > > >       type:
> > > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > > >        +id: j_id_jsp_287013395_13
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > > >        +id: t2c
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > > >
> > > > ^^^^^^^^^^^^^^
> > > >
> > > >        +id: j_id_jsp_287013395_15
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > > >        +id: j_id_jsp_287013395_16
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@1664a9b
> > > >      +id: j_id_jsp_287013395_7
> > > >       type:
> > > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > > >        +id: j_id_jsp_287013395_8
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > > >        +id: t2c
> > > >         type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > > >
> > > > ^^^^^^^^^^^^^^
> > > >
> > > >        +id: j_id_jsp_287013395_10
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@82d603
> > > >        +id: j_id_jsp_287013395_11
> > > >         type:
> > > javax.faces.component.html.HtmlOutputText@1b09282
> > > >
> > > >
> > >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > > >
> > >
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> > > >
> > >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> > > >
> > > > best regards
> > > > Łukasz
> > > >
> > > >
> > > >
> > > >
> > > > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > > No this is right. Component IDs in "looping" components should
> always be
> > > the
> > > > > same. Client IDs change.
> > > > >
> > > > > Your example doesn't show t2c at all. Look for two components it
> your
> > > page
> > > > > that are under the tree and have t2c as their ID. Maybe you thought
> that
> > > two
> > > > > components could have the same ID in different facets?
> > > > >
> > > > >
> > > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > > Hi All,
> > > > > >
> > > > > > I'm running a <t:tree2 /> example available at:
> > > > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > > >
> > > > > > And the result is:
> > > > > >
> > > > > > javax.servlet.ServletException: Component ID
> treeForm:clientTree:t2c
> > > > > > has already been found in the view.  See below for details.
> > > > > > +id: j_id_jsp_287013395_0
> > > > > >  type: javax.faces.component.UIViewRoot@ad89ec
> > > > > >  +id: treeForm
> > > > > >   type:
> javax.faces.component.html.HtmlForm@13a0934
> > > > > >    +id: clientTree
> > > > > >     type:
> > > > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > > >      +id: j_id_jsp_287013395_17
> > > > > >       type:
> > > > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > > >        +id: j_id_jsp_287013395_18
> > > > > >         type:
> > > > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > > >          +id: j_id_jsp_287013395_19
> > > > > >           type:
> > > > >
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > > >
> > > > > > ... and so on
> > > > > >
> > > > > > the only id that I have set in my tree.jsp are:
> > > > > >
> > > > > >
> > > > > > <h:form id="treeForm">
> > > > > >  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > > > var="node" varNodeToggler="t">
> > > > > >
> > > > > > ...
> > > > > >
> > > > > > the rest is simply copy and paste from the above mentioned web
> site.
> > > > > >
> > > > > > I'm using:
> > > > > >
> > > > > > myfaces-shared-tomahawk-3.0.1
> > > > > > tomahawk-1.1.7-SNAPSHOT
> > > > > >
> > > > > > since all ids should be unique clearly this is... a bug?
> > > > > >
> > > > > > best regards
> > > > > > Łukasz
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
That doesn't make much sense to me as generated IDs are in the form of
"_id##", so t2c is not possible unless you or some code explicitly sets it
somewhere. What JSF impl version are you using.

Also try grepping your code for t2c.

-Andrew

On Feb 5, 2008 4:38 PM, Łukasz Budnik <lu...@gmail.com> wrote:

> Hi,
>
> My view code is simply copy & paste from:
> http://www.irian.at/myfacesexamples/tree2.jsp.source
>
> and looks like this:
>
> <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> var="node" varNodeToggler="t">
>                    <f:facet name="person">
>                        <h:panelGroup>
>                            <f:facet name="expand">
>                                <t:graphicImage
> value="/images/tomahawk/yellow-folder-open.png"
> rendered="#{t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <f:facet name="collapse">
>                                <t:graphicImage
> value="/images/tomahawk/yellow-folder-closed.png"
> rendered="#{!t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <h:outputText value="#{node.description}"
> styleClass="nodeFolder"/>
>                        </h:panelGroup>
>                    </f:facet>
>                    <f:facet name="foo-folder">
>                        <h:panelGroup>
>                            <f:facet name="expand">
>                                <t:graphicImage
> value="/images/tomahawk/yellow-folder-open.png"
> rendered="#{t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <f:facet name="collapse">
>                                <t:graphicImage
> value="/images/tomahawk/yellow-folder-closed.png"
> rendered="#{!t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <h:outputText value="#{node.description}"
> styleClass="nodeFolder"/>
>                            <h:outputText value="
> (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> node.children}"/>
>                        </h:panelGroup>
>                    </f:facet>
>                    <f:facet name="bar-folder">
>                        <h:panelGroup>
>                            <f:facet name="expand">
>                                <t:graphicImage
> value="/images/tomahawk/blue-folder-open.gif"
> rendered="#{t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <f:facet name="collapse">
>                                <t:graphicImage
> value="/images/tomahawk/blue-folder-closed.png"
> rendered="#{!t.nodeExpanded}" border="0"/>
>                            </f:facet>
>                            <h:outputText value="#{node.description}"
> styleClass="nodeFolder"/>
>                            <h:outputText value="
> (#{node.childCount})" styleClass="childCount" rendered="#{!empty
> node.children}"/>
>                        </h:panelGroup>
>                    </f:facet>
>                    <f:facet name="document">
>                        <h:panelGroup>
>                            <h:commandLink immediate="true"
> styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
> actionListener="#{t.setNodeSelected}">
>                                <t:graphicImage
> value="/images/tomahawk/document.png" border="0"/>
>                                <h:outputText value="#{node.description}"/>
>                                <f:param name="docNum"
> value="#{node.identifier}"/>
>                            </h:commandLink>
>                        </h:panelGroup>
>                    </f:facet>
>                </t:tree2>
>
> best regards
> Łukasz
>
> On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > Where is the view code?
> >
> >
> > On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > Sorry,
> > >
> > > this is full stack trace, the id treeForm:clientTree:t2c is repeated 3
> > > times (I have highlighted it):
> > >
> > >
> > > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > > has already been found in the view.  See below for details.
> > > +id: j_id_jsp_287013395_0
> > >  type: javax.faces.component.UIViewRoot@11bd9c9
> > >  +id: treeForm
> > >   type: javax.faces.component.html.HtmlForm@17748d3
> > >    +id: clientTree
> > >     type: org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> > >
> > >      +id: j_id_jsp_287013395_17
> > >       type:
> > javax.faces.component.html.HtmlPanelGroup@f268de
> > >
> > >        +id: j_id_jsp_287013395_18
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> > >
> > >        +id: j_id_jsp_287013395_19
> > >         type:
> > javax.faces.component.html.HtmlOutputText@1c5af2e
> > >        +id: j_id_jsp_287013395_20
> > >         type: javax.faces.component.UIParameter@1702c48
> > >      +id: j_id_jsp_287013395_3
> > >       type:
> > javax.faces.component.html.HtmlPanelGroup@16b6c55
> > >        +id: j_id_jsp_287013395_4
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> > >        +id: t2c
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> > >
> > > ^^^^^^^^^^^^^^
> > >
> > >        +id: j_id_jsp_287013395_6
> > >         type:
> > javax.faces.component.html.HtmlOutputText@1d5b89c
> > >      +id: j_id_jsp_287013395_12
> > >       type:
> > javax.faces.component.html.HtmlPanelGroup@4b0bbb
> > >        +id: j_id_jsp_287013395_13
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> > >        +id: t2c
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> > >
> > > ^^^^^^^^^^^^^^
> > >
> > >        +id: j_id_jsp_287013395_15
> > >         type:
> > javax.faces.component.html.HtmlOutputText@1c5ddd3
> > >        +id: j_id_jsp_287013395_16
> > >         type:
> > javax.faces.component.html.HtmlOutputText@1664a9b
> > >      +id: j_id_jsp_287013395_7
> > >       type:
> > javax.faces.component.html.HtmlPanelGroup@ac06d4
> > >        +id: j_id_jsp_287013395_8
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> > >        +id: t2c
> > >         type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> > >
> > > ^^^^^^^^^^^^^^
> > >
> > >        +id: j_id_jsp_287013395_10
> > >         type:
> > javax.faces.component.html.HtmlOutputText@82d603
> > >        +id: j_id_jsp_287013395_11
> > >         type:
> > javax.faces.component.html.HtmlOutputText@1b09282
> > >
> > >
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> > >
> > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> ExtensionsFilter.java:147)
> > >
> > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(
> MonitorFilter.java:390)
> > >
> > > best regards
> > > Łukasz
> > >
> > >
> > >
> > >
> > > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > > No this is right. Component IDs in "looping" components should
> always be
> > the
> > > > same. Client IDs change.
> > > >
> > > > Your example doesn't show t2c at all. Look for two components it
> your
> > page
> > > > that are under the tree and have t2c as their ID. Maybe you thought
> that
> > two
> > > > components could have the same ID in different facets?
> > > >
> > > >
> > > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com>
> wrote:
> > > > > Hi All,
> > > > >
> > > > > I'm running a <t:tree2 /> example available at:
> > > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > > >
> > > > > And the result is:
> > > > >
> > > > > javax.servlet.ServletException: Component ID
> treeForm:clientTree:t2c
> > > > > has already been found in the view.  See below for details.
> > > > > +id: j_id_jsp_287013395_0
> > > > >  type: javax.faces.component.UIViewRoot@ad89ec
> > > > >  +id: treeForm
> > > > >   type: javax.faces.component.html.HtmlForm@13a0934
> > > > >    +id: clientTree
> > > > >     type:
> > > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > > >      +id: j_id_jsp_287013395_17
> > > > >       type:
> > > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > > >        +id: j_id_jsp_287013395_18
> > > > >         type:
> > > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > > >          +id: j_id_jsp_287013395_19
> > > > >           type:
> > > >
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > > >
> > > > > ... and so on
> > > > >
> > > > > the only id that I have set in my tree.jsp are:
> > > > >
> > > > >
> > > > > <h:form id="treeForm">
> > > > >  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > > var="node" varNodeToggler="t">
> > > > >
> > > > > ...
> > > > >
> > > > > the rest is simply copy and paste from the above mentioned web
> site.
> > > > >
> > > > > I'm using:
> > > > >
> > > > > myfaces-shared-tomahawk-3.0.1
> > > > > tomahawk-1.1.7-SNAPSHOT
> > > > >
> > > > > since all ids should be unique clearly this is... a bug?
> > > > >
> > > > > best regards
> > > > > Łukasz
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: [Tomahawk] non-unique IDs in

Posted by Łukasz Budnik <lu...@gmail.com>.
Hi,

My view code is simply copy & paste from:
http://www.irian.at/myfacesexamples/tree2.jsp.source

and looks like this:

<t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
var="node" varNodeToggler="t">
                    <f:facet name="person">
                        <h:panelGroup>
                            <f:facet name="expand">
                                <t:graphicImage
value="/images/tomahawk/yellow-folder-open.png"
rendered="#{t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <f:facet name="collapse">
                                <t:graphicImage
value="/images/tomahawk/yellow-folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <h:outputText value="#{node.description}"
styleClass="nodeFolder"/>
                        </h:panelGroup>
                    </f:facet>
                    <f:facet name="foo-folder">
                        <h:panelGroup>
                            <f:facet name="expand">
                                <t:graphicImage
value="/images/tomahawk/yellow-folder-open.png"
rendered="#{t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <f:facet name="collapse">
                                <t:graphicImage
value="/images/tomahawk/yellow-folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <h:outputText value="#{node.description}"
styleClass="nodeFolder"/>
                            <h:outputText value="
(#{node.childCount})" styleClass="childCount" rendered="#{!empty
node.children}"/>
                        </h:panelGroup>
                    </f:facet>
                    <f:facet name="bar-folder">
                        <h:panelGroup>
                            <f:facet name="expand">
                                <t:graphicImage
value="/images/tomahawk/blue-folder-open.gif"
rendered="#{t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <f:facet name="collapse">
                                <t:graphicImage
value="/images/tomahawk/blue-folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0"/>
                            </f:facet>
                            <h:outputText value="#{node.description}"
styleClass="nodeFolder"/>
                            <h:outputText value="
(#{node.childCount})" styleClass="childCount" rendered="#{!empty
node.children}"/>
                        </h:panelGroup>
                    </f:facet>
                    <f:facet name="document">
                        <h:panelGroup>
                            <h:commandLink immediate="true"
styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
actionListener="#{t.setNodeSelected}">
                                <t:graphicImage
value="/images/tomahawk/document.png" border="0"/>
                                <h:outputText value="#{node.description}"/>
                                <f:param name="docNum"
value="#{node.identifier}"/>
                            </h:commandLink>
                        </h:panelGroup>
                    </f:facet>
                </t:tree2>

best regards
Łukasz

On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> Where is the view code?
>
>
> On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> > Sorry,
> >
> > this is full stack trace, the id treeForm:clientTree:t2c is repeated 3
> > times (I have highlighted it):
> >
> >
> > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > has already been found in the view.  See below for details.
> > +id: j_id_jsp_287013395_0
> >  type: javax.faces.component.UIViewRoot@11bd9c9
> >  +id: treeForm
> >   type: javax.faces.component.html.HtmlForm@17748d3
> >    +id: clientTree
> >     type: org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
> >
> >      +id: j_id_jsp_287013395_17
> >       type:
> javax.faces.component.html.HtmlPanelGroup@f268de
> >
> >        +id: j_id_jsp_287013395_18
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
> >
> >        +id: j_id_jsp_287013395_19
> >         type:
> javax.faces.component.html.HtmlOutputText@1c5af2e
> >        +id: j_id_jsp_287013395_20
> >         type: javax.faces.component.UIParameter@1702c48
> >      +id: j_id_jsp_287013395_3
> >       type:
> javax.faces.component.html.HtmlPanelGroup@16b6c55
> >        +id: j_id_jsp_287013395_4
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
> >        +id: t2c
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
> >
> > ^^^^^^^^^^^^^^
> >
> >        +id: j_id_jsp_287013395_6
> >         type:
> javax.faces.component.html.HtmlOutputText@1d5b89c
> >      +id: j_id_jsp_287013395_12
> >       type:
> javax.faces.component.html.HtmlPanelGroup@4b0bbb
> >        +id: j_id_jsp_287013395_13
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
> >        +id: t2c
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
> >
> > ^^^^^^^^^^^^^^
> >
> >        +id: j_id_jsp_287013395_15
> >         type:
> javax.faces.component.html.HtmlOutputText@1c5ddd3
> >        +id: j_id_jsp_287013395_16
> >         type:
> javax.faces.component.html.HtmlOutputText@1664a9b
> >      +id: j_id_jsp_287013395_7
> >       type:
> javax.faces.component.html.HtmlPanelGroup@ac06d4
> >        +id: j_id_jsp_287013395_8
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
> >        +id: t2c
> >         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
> >
> > ^^^^^^^^^^^^^^
> >
> >        +id: j_id_jsp_287013395_10
> >         type:
> javax.faces.component.html.HtmlOutputText@82d603
> >        +id: j_id_jsp_287013395_11
> >         type:
> javax.faces.component.html.HtmlOutputText@1b09282
> >
> >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> >
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> >
> > best regards
> > Łukasz
> >
> >
> >
> >
> > On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > > No this is right. Component IDs in "looping" components should always be
> the
> > > same. Client IDs change.
> > >
> > > Your example doesn't show t2c at all. Look for two components it your
> page
> > > that are under the tree and have t2c as their ID. Maybe you thought that
> two
> > > components could have the same ID in different facets?
> > >
> > >
> > > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > > Hi All,
> > > >
> > > > I'm running a <t:tree2 /> example available at:
> > > > http://www.irian.at/myfacesexamples/tree2.jsf
> > > >
> > > > And the result is:
> > > >
> > > > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > > > has already been found in the view.  See below for details.
> > > > +id: j_id_jsp_287013395_0
> > > >  type: javax.faces.component.UIViewRoot@ad89ec
> > > >  +id: treeForm
> > > >   type: javax.faces.component.html.HtmlForm@13a0934
> > > >    +id: clientTree
> > > >     type:
> > > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > > >      +id: j_id_jsp_287013395_17
> > > >       type:
> > > javax.faces.component.html.HtmlPanelGroup@e00c09
> > > >        +id: j_id_jsp_287013395_18
> > > >         type:
> > > javax.faces.component.html.HtmlCommandLink@1364b53
> > > >          +id: j_id_jsp_287013395_19
> > > >           type:
> > >
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > > >
> > > > ... and so on
> > > >
> > > > the only id that I have set in my tree.jsp are:
> > > >
> > > >
> > > > <h:form id="treeForm">
> > > >  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > > var="node" varNodeToggler="t">
> > > >
> > > > ...
> > > >
> > > > the rest is simply copy and paste from the above mentioned web site.
> > > >
> > > > I'm using:
> > > >
> > > > myfaces-shared-tomahawk-3.0.1
> > > > tomahawk-1.1.7-SNAPSHOT
> > > >
> > > > since all ids should be unique clearly this is... a bug?
> > > >
> > > > best regards
> > > > Łukasz
> > > >
> > >
> > >
> >
>
>

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
Where is the view code?

On Feb 5, 2008 12:08 PM, Łukasz Budnik <lu...@gmail.com> wrote:

> Sorry,
>
> this is full stack trace, the id treeForm:clientTree:t2c is repeated 3
> times (I have highlighted it):
>
> javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> has already been found in the view.  See below for details.
> +id: j_id_jsp_287013395_0
>  type: javax.faces.component.UIViewRoot@11bd9c9
>  +id: treeForm
>   type: javax.faces.component.html.HtmlForm@17748d3
>    +id: clientTree
>     type: org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
>      +id: j_id_jsp_287013395_17
>       type: javax.faces.component.html.HtmlPanelGroup@f268de
>        +id: j_id_jsp_287013395_18
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
>        +id: j_id_jsp_287013395_19
>         type: javax.faces.component.html.HtmlOutputText@1c5af2e
>        +id: j_id_jsp_287013395_20
>         type: javax.faces.component.UIParameter@1702c48
>      +id: j_id_jsp_287013395_3
>       type: javax.faces.component.html.HtmlPanelGroup@16b6c55
>        +id: j_id_jsp_287013395_4
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
>        +id: t2c
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4
>
> ^^^^^^^^^^^^^^
>
>        +id: j_id_jsp_287013395_6
>         type: javax.faces.component.html.HtmlOutputText@1d5b89c
>      +id: j_id_jsp_287013395_12
>       type: javax.faces.component.html.HtmlPanelGroup@4b0bbb
>        +id: j_id_jsp_287013395_13
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
>        +id: t2c
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c
>
> ^^^^^^^^^^^^^^
>
>        +id: j_id_jsp_287013395_15
>         type: javax.faces.component.html.HtmlOutputText@1c5ddd3
>        +id: j_id_jsp_287013395_16
>         type: javax.faces.component.html.HtmlOutputText@1664a9b
>      +id: j_id_jsp_287013395_7
>       type: javax.faces.component.html.HtmlPanelGroup@ac06d4
>        +id: j_id_jsp_287013395_8
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
>        +id: t2c
>         type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79
>
> ^^^^^^^^^^^^^^
>
>        +id: j_id_jsp_287013395_10
>         type: javax.faces.component.html.HtmlOutputText@82d603
>        +id: j_id_jsp_287013395_11
>         type: javax.faces.component.html.HtmlOutputText@1b09282
>
>        javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
>        org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> ExtensionsFilter.java:147)
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(
> MonitorFilter.java:390)
>
> best regards
> Łukasz
>
> On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> > No this is right. Component IDs in "looping" components should always be
> the
> > same. Client IDs change.
> >
> > Your example doesn't show t2c at all. Look for two components it your
> page
> > that are under the tree and have t2c as their ID. Maybe you thought that
> two
> > components could have the same ID in different facets?
> >
> >
> > On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > > Hi All,
> > >
> > > I'm running a <t:tree2 /> example available at:
> > > http://www.irian.at/myfacesexamples/tree2.jsf
> > >
> > > And the result is:
> > >
> > > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > > has already been found in the view.  See below for details.
> > > +id: j_id_jsp_287013395_0
> > >  type: javax.faces.component.UIViewRoot@ad89ec
> > >  +id: treeForm
> > >   type: javax.faces.component.html.HtmlForm@13a0934
> > >    +id: clientTree
> > >     type:
> > org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> > >      +id: j_id_jsp_287013395_17
> > >       type:
> > javax.faces.component.html.HtmlPanelGroup@e00c09
> > >        +id: j_id_jsp_287013395_18
> > >         type:
> > javax.faces.component.html.HtmlCommandLink@1364b53
> > >          +id: j_id_jsp_287013395_19
> > >           type:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> > >
> > > ... and so on
> > >
> > > the only id that I have set in my tree.jsp are:
> > >
> > >
> > > <h:form id="treeForm">
> > >  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > > var="node" varNodeToggler="t">
> > >
> > > ...
> > >
> > > the rest is simply copy and paste from the above mentioned web site.
> > >
> > > I'm using:
> > >
> > > myfaces-shared-tomahawk-3.0.1
> > > tomahawk-1.1.7-SNAPSHOT
> > >
> > > since all ids should be unique clearly this is... a bug?
> > >
> > > best regards
> > > Łukasz
> > >
> >
> >
>

Re: [Tomahawk] non-unique IDs in

Posted by Łukasz Budnik <lu...@gmail.com>.
Sorry,

this is full stack trace, the id treeForm:clientTree:t2c is repeated 3
times (I have highlighted it):

javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
has already been found in the view.  See below for details.
+id: j_id_jsp_287013395_0
 type: javax.faces.component.UIViewRoot@11bd9c9
  +id: treeForm
   type: javax.faces.component.html.HtmlForm@17748d3
    +id: clientTree
     type: org.apache.myfaces.custom.tree2.HtmlTree@4e2f0a
      +id: j_id_jsp_287013395_17
       type: javax.faces.component.html.HtmlPanelGroup@f268de
        +id: j_id_jsp_287013395_18
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@c2cf83
        +id: j_id_jsp_287013395_19
         type: javax.faces.component.html.HtmlOutputText@1c5af2e
        +id: j_id_jsp_287013395_20
         type: javax.faces.component.UIParameter@1702c48
      +id: j_id_jsp_287013395_3
       type: javax.faces.component.html.HtmlPanelGroup@16b6c55
        +id: j_id_jsp_287013395_4
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@1954f89
        +id: t2c
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@198e8b4

^^^^^^^^^^^^^^

        +id: j_id_jsp_287013395_6
         type: javax.faces.component.html.HtmlOutputText@1d5b89c
      +id: j_id_jsp_287013395_12
       type: javax.faces.component.html.HtmlPanelGroup@4b0bbb
        +id: j_id_jsp_287013395_13
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@ef4504
        +id: t2c
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@9c176c

^^^^^^^^^^^^^^

        +id: j_id_jsp_287013395_15
         type: javax.faces.component.html.HtmlOutputText@1c5ddd3
        +id: j_id_jsp_287013395_16
         type: javax.faces.component.html.HtmlOutputText@1664a9b
      +id: j_id_jsp_287013395_7
       type: javax.faces.component.html.HtmlPanelGroup@ac06d4
        +id: j_id_jsp_287013395_8
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@1f47ae8
        +id: t2c
         type: org.apache.myfaces.component.html.ext.HtmlGraphicImage@1b11b79

^^^^^^^^^^^^^^

        +id: j_id_jsp_287013395_10
         type: javax.faces.component.html.HtmlOutputText@82d603
        +id: j_id_jsp_287013395_11
         type: javax.faces.component.html.HtmlOutputText@1b09282

	javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

best regards
Łukasz

On 05/02/2008, Andrew Robinson <an...@gmail.com> wrote:
> No this is right. Component IDs in "looping" components should always be the
> same. Client IDs change.
>
> Your example doesn't show t2c at all. Look for two components it your page
> that are under the tree and have t2c as their ID. Maybe you thought that two
> components could have the same ID in different facets?
>
>
> On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com> wrote:
> > Hi All,
> >
> > I'm running a <t:tree2 /> example available at:
> > http://www.irian.at/myfacesexamples/tree2.jsf
> >
> > And the result is:
> >
> > javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> > has already been found in the view.  See below for details.
> > +id: j_id_jsp_287013395_0
> >  type: javax.faces.component.UIViewRoot@ad89ec
> >  +id: treeForm
> >   type: javax.faces.component.html.HtmlForm@13a0934
> >    +id: clientTree
> >     type:
> org.apache.myfaces.custom.tree2.HtmlTree@1324b17
> >      +id: j_id_jsp_287013395_17
> >       type:
> javax.faces.component.html.HtmlPanelGroup@e00c09
> >        +id: j_id_jsp_287013395_18
> >         type:
> javax.faces.component.html.HtmlCommandLink@1364b53
> >          +id: j_id_jsp_287013395_19
> >           type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
> >
> > ... and so on
> >
> > the only id that I have set in my tree.jsp are:
> >
> >
> > <h:form id="treeForm">
> >  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> > var="node" varNodeToggler="t">
> >
> > ...
> >
> > the rest is simply copy and paste from the above mentioned web site.
> >
> > I'm using:
> >
> > myfaces-shared-tomahawk-3.0.1
> > tomahawk-1.1.7-SNAPSHOT
> >
> > since all ids should be unique clearly this is... a bug?
> >
> > best regards
> > Łukasz
> >
>
>

Re: [Tomahawk] non-unique IDs in

Posted by Andrew Robinson <an...@gmail.com>.
No this is right. Component IDs in "looping" components should always be the
same. Client IDs change.

Your example doesn't show t2c at all. Look for two components it your page
that are under the tree and have t2c as their ID. Maybe you thought that two
components could have the same ID in different facets?

On Feb 5, 2008 10:54 AM, Łukasz Budnik <lu...@gmail.com> wrote:

> Hi All,
>
> I'm running a <t:tree2 /> example available at:
> http://www.irian.at/myfacesexamples/tree2.jsf
>
> And the result is:
>
> javax.servlet.ServletException: Component ID treeForm:clientTree:t2c
> has already been found in the view.  See below for details.
> +id: j_id_jsp_287013395_0
>  type: javax.faces.component.UIViewRoot@ad89ec
>  +id: treeForm
>   type: javax.faces.component.html.HtmlForm@13a0934
>    +id: clientTree
>     type: org.apache.myfaces.custom.tree2.HtmlTree@1324b17
>      +id: j_id_jsp_287013395_17
>       type: javax.faces.component.html.HtmlPanelGroup@e00c09
>        +id: j_id_jsp_287013395_18
>         type: javax.faces.component.html.HtmlCommandLink@1364b53
>          +id: j_id_jsp_287013395_19
>           type:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage@18b62e0
>
> ... and so on
>
> the only id that I have set in my tree.jsp are:
>
>
> <h:form id="treeForm">
>  <t:tree2 id="clientTree" value="#{Tree2TestController.treeData}"
> var="node" varNodeToggler="t">
>
> ...
>
> the rest is simply copy and paste from the above mentioned web site.
>
> I'm using:
>
> myfaces-shared-tomahawk-3.0.1
> tomahawk-1.1.7-SNAPSHOT
>
> since all ids should be unique clearly this is... a bug?
>
> best regards
> Łukasz
>