This discussion is archived
2 Replies Latest reply: Nov 7, 2012 11:31 PM by jmsjr RSS

Is there a limit on the number of target renders in f:ajax ?

jmsjr Newbie
Currently Being Moderated
JSF2.1
Mojarra 2.1.7-jbossorg-1 (20120227-1401)

Is there a limit on the number of components to be rendered on an ajax call ? It seems that only the first three components in the space-delimited list of ids are rendered. Anything after the 3rd id is ignored.

For example, the following:
<h:commandButton id="search" value="Search" action="#{memberDTO.retrieveMemberDetails()}">
    <f:ajax execute="f_planCode f_mbrId" render="memberName f_mbrRefId allMemberDetails notesPanel"/>
</h:commandButton>
... will correctly render the components with ids of "memberName", "f_mbrRefId", and "allMemberDetails". The component with id of "notesPanel" is NOT rendered. If I switch the 3rd and 4th ids as below:
<h:commandButton id="search" value="Search" action="#{memberDTO.retrieveMemberDetails()}">
    <f:ajax execute="f_planCode f_mbrId" render="memberName f_mbrRefId notesPanel allMemberDetails"/>
</h:commandButton>
.. will correctly render the components with ids of "memberName", "f_mbrRefId", and "notesPanel". The component with id of "allMemberDetails" is NOT rendered.

1) Is this supposed to be the case ?
2) If not, is this a bug ?
  • 1. Re: Is there a limit on the number of target renders in f:ajax ?
    gimbal2 Guru
    Currently Being Moderated
    jmsjr wrote:
    .. will correctly render the components with ids of "memberName", "f_mbrRefId", and "notesPanel". The component with id of "allMemberDetails" is NOT rendered.
    You don't know that, you just assume that. All you know is that you don't get the result you are expecting, that is a whole different matter than the re-render not actually happening. If what you say would be true I would expect the notesPanel to also not re-render.

    Different investigation: why is the panel rerendering but are you not getting the results you are expecting? Pretty sure you're going to spot something when you search from that perspective.
  • 2. Re: Is there a limit on the number of target renders in f:ajax ?
    jmsjr Newbie
    Currently Being Moderated
    gimbal2 wrote:
    jmsjr wrote:
    .. will correctly render the components with ids of "memberName", "f_mbrRefId", and "notesPanel". The component with id of "allMemberDetails" is NOT rendered.
    You don't know that, you just assume that. All you know is that you don't get the result you are expecting, that is a whole different matter than the re-render not actually happening. If what you say would be true I would expect the notesPanel to also not re-render.

    Different investigation: why is the panel rerendering but are you not getting the results you are expecting? Pretty sure you're going to spot something when you search from that perspective.
    Must have been tired due to lack of sleep. After trying it again with fresh eyes, yes indeed .. all 4 components ( 2 input fields, 2 panels ) are indeed being refreshed.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points