0

I have the following:

<h:form id="form" >
   <h:panelGroup>
     <h:selectBooleanCheckbox value="#{item.value}">
     <f:ajax listener="#{bean.test()}" execute="@this" render=":form:modes"/>
   </h:panelGroup>

   <rich:collapsiblePanel id="modes" header="Show/hide" switchType="client">
       ........
   </rich:collapsiblePanel>
</h:form>

But I get an error saying contains an unknown id ':form:modes' - cannot locate it in the context of the component. I have also tried doing render=":modes" but I get the same error.

p192
  • 518
  • 1
  • 6
  • 19
  • Can you just give render="modes" ? – OTM Apr 05 '17 at 04:04
  • No. It produces the same error. – p192 Apr 05 '17 at 12:53
  • Check your rendered HTML and make sure something is getting rendered with that id. If you haven't read it yet, this answer gives a very thorough overview of id's in ajax calls and including several tricks to resolve the common issues http://stackoverflow.com/a/8644762/2780051 – axemoi Apr 05 '17 at 13:19
  • So the id is being rendered as form:modes on the HTML. Thanks for the link axemoi, but still no luck. I tried doing render="form:modes" & ":form:modes" & ":modes" & "modes" but nothing seems to work – p192 Apr 05 '17 at 14:25
  • might be a copy/paste error.. just that the f:ajax tag seems to be missing the "/>" at the end. – OTM Apr 05 '17 at 14:28
  • Oh sorry, that was an error when copying my code on stackoverflow. I fixed it. – p192 Apr 05 '17 at 14:30
  • can you just cross verify the html produced by viewing the source and checking if the rich:collapsiblePanel is there with id="modes" correctly ? – OTM Apr 05 '17 at 15:51

0 Answers0