FAQ
I have a master data table and multiple JSP fragments displayed via tabbed pane as details. Data table is sortable and also I have search criteria on the table which are performed by a 'Go' button outside the table. The page loads fine when it is first invoked. When I click on a table column for sorting or enter some criteria and press the Go button I get 'Can not add component error. When I looked through the stack trace, I noticed that it happened in one of my jspf in the detail pane. The line where the error is reported is an outputText which has just a text value. I could not find anything wrong with that page.

javax.faces.FacesException: cannot add component '_id157'

at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:428)

at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:246)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_outputText_4(customer_002dactivities_jsp.java:432)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_2(customer_002dactivities_jsp.java:263)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_1(customer_002dactivities_jsp.java:214)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_0(customer_002dactivities_jsp.java:170)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_f_subview_0(customer_002dactivities_jsp.java:140)

at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspService(customer_002dactivities_jsp.java:113)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

...

at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:220)

at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:206)

at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)

......

Has anyone encountered this error before ? Please help.



Thanks,

Aruna





---------------------------------
Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!

Search Discussions

  • Aruna Kumaraswamy at May 30, 2005 at 2:47 pm
    I came across this message regarding this error. The page which is giving me this error is a large size page as well. Has this defect been fixed ?

    http://www.mail-archive.com/users@myfaces.apache.org/msg03538.html

    - Aruna

    Aruna Kumaraswamy wrote:
    I have a master data table and multiple JSP fragments displayed via tabbed pane as details. Data table is sortable and also I have search criteria on the table which are performed by a 'Go' button outside the table. The page loads fine when it is first invoked. When I click on a table column for sorting or enter some criteria and press the Go button I get 'Can not add component error. When I looked through the stack trace, I noticed that it happened in one of my jspf in the detail pane. The line where the error is reported is an outputText which has just a text value. I could not find anything wrong with that page.

    javax.faces.FacesException: cannot add component '_id157'

    at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:428)

    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:246)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_outputText_4(customer_002dactivities_jsp.java:432)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_2(customer_002dactivities_jsp.java:263)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_1(customer_002dactivities_jsp.java:214)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_h_panelGrid_0(customer_002dactivities_jsp.java:170)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspx_meth_f_subview_0(customer_002dactivities_jsp.java:140)

    at org.apache.jsp.WEB_002dINF.jsp.sales.customers.customer_002dactivities_jsp._jspService(customer_002dactivities_jsp.java:113)

    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

    ...

    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:220)

    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:206)

    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)

    ......

    Has anyone encountered this error before ? Please help.



    Thanks,

    Aruna





    ---------------------------------
    Do You Yahoo!?
    Yahoo! Small Business - Try our new Resources site!
    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • Mathias Werlitz at May 30, 2005 at 3:15 pm
    I usually get this kind of error, when I develop a jsp page with jsf
    components. State saving method is "CLIENT". I guess the problem is caused
    because the serialized view does not correspond to the structure of the
    new page. When the work on the page is finished and the "right" serialized
    view is send back to the server everything works fine. But I don't use
    subviews at the moment. Maybe there is a problem regarding this, if you
    change the subview.
  • Aruna Kumaraswamy at May 30, 2005 at 5:03 pm
    Thanks for your response. Yes , we use subviews. We have one master datatable and 9 detail tabs, where each tab is a subview. I don't understand what you mean by "if you change the subview". Could you please explain.

    Thanks,
    Aruna

    mathias.werlitz@daimlerchrysler.com wrote:

    I usually get this kind of error, when I develop a jsp page with jsf components. State saving method is "CLIENT". I guess the problem is caused because the serialized view does not correspond to the structure of the new page. When the work on the page is finished and the "right" serialized view is send back to the server everything works fine. But I don't use subviews at the moment. Maybe there is a problem regarding this, if you change the subview.

    ---------------------------------
    Do You Yahoo!?
    Yahoo! Small Business - Try our new Resources site!
  • Hendrik Neumann at May 30, 2005 at 9:00 pm
    Hi,

    I'm still migrating from from x:panelLayout to classic html-frames because I
    have the problem, that I need 100% valid xhtml-code which is valid for the
    mime type application/xhtml+xml but this is extremly hard because JSF
    produces invalid xhtml code (I have descriped this problem in the "Serious
    problems with MyFaces ID allocation which is not conform to XHTML!"-mail).
    THerefore I try to seperate my whole web-app into several frames with
    minimal, but valid xhtml-code.

    Now I have the following (simplified) situation: I have 2 frames: one
    navigation-frame on the left side and one big mainframe. The navigation frame
    contains a tree2-component which loads folders and documents from a database
    and gernate for each tree-item a navigation case which targets the mainframe
    and loads a new site in the mainframe. This new loaded mainframe-site then
    contains a self-made article-renderer or a folder-renderer which renders the
    content. Now if the user clicks on the an item in the tree2-component in the
    navigation-frame, the mainframe is loaded and the navigation-frame is of
    course NOT reloaded (because I have frames). If the user then clicks again in
    the nav-frame on a link, the jsf-site will just be reloaded (and showed in
    the mainframe) instead of processing the action-link. Only after this forced
    reload the commandLinks are working again. So I have to reload the navigation
    frame ON EVERY CLICK in the tree2-components which causes A LOT of troubles.

    This seems to be a generally problem, that after clicking on a rendered
    commandLink the site which contains this link must to be reloaded. Is there a
    reason why it is like this? Is there a workaround?

    Greetings,
    Hendrik
  • Mathias Werlitz at May 31, 2005 at 9:24 am
    What is your state saving method. I guess it is "SERVER". The current JSF
    1.1 spec seems to have problems with multiple open views (as produced with
    frames).
    Try to set the state saving method to "CLIENT" and it should work
    correctly.
  • Hendrik Neumann at May 31, 2005 at 9:59 am
    the good thing: It works - thank you very much mathias!
    the bad thing: now I'm forced to use the client-state-saving-method which
    causes new problems...

    well, this buggy JSF-spec is totally driving me crazy - Sun Microsystems
    should fire the employees who played a part in the creation of this spec...
    the idea itself is good, myfaces is good but the implementation-spec is
    dreadful...

    By the way: how can I contact the JSF-creators? Where can I subscribe to their
    mailing-lists? Where can I talk with them? I have a lot of questions...

    Am Dienstag, 31. Mai 2005 11:23 schrieb mathias.werlitz@daimlerchrysler.com:
    What is your state saving method. I guess it is "SERVER". The current JSF
    1.1 spec seems to have problems with multiple open views (as produced with
    frames).
    Try to set the state saving method to "CLIENT" and it should work
    correctly.
  • Mathias Werlitz at May 31, 2005 at 9:12 am
    Well I my case I am editing the jsp files and the component structure. It
    would be interesting to know exactly how you switch between the different
    detail tabs (subviews). There maybe a general issue on using a datatable
    and subviews within it, because the datatable has to store the state of
    the subcomponents in a special way while iterating over the list. But I
    don't know enough about that and did not test it.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmyfaces
postedMay 29, '05 at 1:34p
activeMay 31, '05 at 9:59a
posts8
users3
websitemyfaces.apache.org

People

Translate

site design / logo © 2019 Grokbase