0
votes

Just saw a lot of questions envolving "update", "@all", "@form", but no one solved a situation here in my application.

I got a custom JSF tag called threadList with:

<h:form>
    <h:panelGroup>
        <p:commandButton action="#{Bean.action(catId, id)}" icon="ui-icon-weblibrary ui-icon-weblibrary-like" title="Start" update="@form" value="#{Bean.threadName}" />
    </h:panelGroup>
</h:form>

This custom tag is inserted by another custom tag like this:

<ui:repeat value="#{Bean.threadList}" var="thread">
   <ui:include src="threadList.xhtml">
      <ui:param name="catId" value="..." />
      <ui:param name="id" value="..." />
   </ui:include>
</ui:repeat>

Sometimes this can be a result of an update in the second taglib and via ajax.

And here's the thing...

  • When I set update="@form" in the p:commandButton everything works fine but in my log I see a "Cannot find component with identifier "j_idt70:0:j_idt82" in view.";
  • When I set update=":@form" or update=":form" the "Cannot find component with identifier "j_idt70:0:j_idt82" in view." disappears, but the event doesn't update anything (even if the action runs with success);
  • Finally, when I give form and panelGroup an id and try update=":formId:panelId" or update=":@formId:panelId" or update=":formId" the message "Cannot find component with identifier "j_idt70:0:j_idt82" in view." appears and nothing is uptade.

The curious is that there's no in browser's source code. So, I don't know if this "ghost" j_idt70 is corrupting all the ids and update commands.

I tried all the things I learned in old questions in stack overflow before asking you again about this.

Thanks a lot for reading and the attention.

1
What JSF impl/version and PF version?BalusC
That "ghost" id is an autogenerated id from a component. Try to add IDs to all your components so when the error message is printed it will tell you the component id you're looking for. Also, if your custom component has a form, remember than the <ui:repeat> will print N forms inside your xhtml page, and the commandButton scope will be only that form (at least with your actual design). If you're using JSF 2, maybe this link can help you.Luiggi Mendoza
@BalusC, I'm using JSF 2.0 and Primefaces 3.0.1.Adriano Castro
@LuiggiMendoza, I read the link but I'm afraid we can't change it from a managed bean to a composite component. Not now, maybe in the future.Adriano Castro
"JSF 2.0" is a spec version, not a impl name nor version.BalusC

1 Answers

2
votes

The code given so far works just fine for me on Mojarra 2.1.9 and PrimeFaces 3.3.

If you upgrade to the latest versions as well, then your problem should most likely be solved.