webtier@glassfish.java.net

JSF2 f:ajax render attribute within a ui:repeat

From: Joel Weight <digitaljoel_at_gmail.com>
Date: Wed, 16 Dec 2009 16:27:32 -0700

Sorry to bug, but with most of java.net being down I haven't been able to
find much information on f:ajax in jsf2.

I have code like the following

<h:outputFormat id="repeat_selector" value="#{chkmsgs.selector_text}" >
    <f:param value="#{checkboxbean.repeatSelectedCount}" />
</h:outputFormat>
<table>
    <thead>
        <th>Selected</th>
        <th>Name</th>
    </thead>
    <ui:repeat value="#{checkboxbean.repeatItems}" var="item" >
        <tr>
            <td><h:selectBooleanCheckbox value="#{item.selected}">
                    <f:ajax event="change" render="repeat_selector" />
                </h:selectBooleanCheckbox>
            </td>
            <td><h:outputText value="#{item.name}" />
            </td>
        </tr>
    </ui:repeat>
</table>


When it attempts to render the page it gives me the following:

'<f:ajax> contains an unknown id 'repeat_selector' - cannot locate it in the
context of the component j_idt40'

I have code very similar but without the ui:repeat and it works without
problem. Any thoughts on this? Everything is within the same form, but I
certainly don't want to re-render the entire form.

Thanks in advance,
Joel