I do not use Primefaces, but Richfaces in my projects. Therefore, I do not know how the update process is performed using Primefaces. However, I have an idea that can be easily tested.
Your problem may be due to the fact that the component for reprocessing (for example, updating) was not found on the HTML page. If your rendered attribute is false , then <SPAN> with comment id is not integrated into the generated HTML page. Thus, when an Ajax request is received on the client side, the Ajax mechanism cannot update this <SPAN> because it was not found.
So, you can always display panelGroup and move your rendered attribute to a nested <h:outputText> containing the Hello message.
Here is what I suggest:
<h:panelGroup id="comment"> <h:outputText value="Hello" rendered="#{bean.renderComment}"/> </h:panelGroup>
This way panelGroup will always be updated after an Ajax call and will contain a Hello message or not regarding the value of the renderComment attribute of your bean.
source share