• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

FacesException: f:ajax contains an unknown id - cannot locate it in the context of the component

 
Ranch Hand
Posts: 106
Hibernate Python MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a repository of files, there's one tab for each type, here only external documents. They're listed per tab via data table. Don't be irritated by the sub tables, it's just for grouping certain files to a company. There's a delete commandLink to the right of each data table entry which pops up a dialog asking if s/he really wants to delete the file. On deletion, I want to update the list of files of course.

I have the following code:
Note the AJAXed h:commandButton above (it's a button on a RichFaces popup dialog to confirm deletion). Specifying simply works. Specifying to only update the necessary part/s results in a FacesException:

Why isn't JSF able to find any of the outcommented IDs above? Any explanation welcome.

Karsten
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try this:
repo-form:repo-edoc-datatable
 
Karsten Wutzke
Ranch Hand
Posts: 106
Hibernate Python MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean render=":repo-form:repo-edoc-datatable"... this works.

But what is the policy here? I thought the : syntax is for components outside the current form. Isn't there a form-local syntax? (I tried to use render="@form:repo-edoc-datatable" but this just resulted in another exception: @form:repo-edoc-datatable : Invalid id keyword specified for 'render' attribute...)

Thanks
Karsten
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default, your form ID will go attached to every component that your page has.

Try this, in your h:form put the option prependId=false and test with your old code. [=
 
Evacuate the building! Here, take this tiny ad with you:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic