Jsf 如何在RichFaces中使用dynamicali id重新命名元素

Jsf 如何在RichFaces中使用dynamicali id重新命名元素,jsf,richfaces,render,rerender,Jsf,Richfaces,Render,Rerender,我的页面上有以下代码: <a4j:repeat value="#{tdController.cu.esaDoutCUConsigment.esaDoutCUDepartureArrivalTransport.transportMeans}" var="transportMean" rowKeyVar="idx"> <tr> <td> <rich:a

我的页面上有以下代码:

    <a4j:repeat value="#{tdController.cu.esaDoutCUConsigment.esaDoutCUDepartureArrivalTransport.transportMeans}" var="transportMean" rowKeyVar="idx">
              <tr>
                <td>
                    <rich:autocomplete id="transportMeansInactiveCountry#{idx}" mode="cachedAjax"
                                       autocompleteMethod="#{countryList.autoComplete}"
                                       minChars="1" layout="grid"
                                       var="country" fetchValue="#{country.code}" width="50px"
                                       inputClass="autoCompleteWidth20"
                                       immediate="true" autofill="true"
                                       value="#{transportMean.country}"
                                       converter="com.enfasis.eced.common.controller.converter.CountryConverterAutoComplete">
                        <h:outputFormat value="{0}({1})">
                            <f:param value="#{country.name}"/>
                            <f:param value="#{country.code}"/>
                        </h:outputFormat>

                        <a4j:ajax event="selectitem" execute="@this"
                                  render="transportMeansInactiveCountryCode#{idx}"/>
                    </rich:autocomplete>
                    <h:outputText id="transportMeansInactiveCountryCode#{idx}"
                                  value="#{transportMean.country.name}" style="margin-left:5px"/>
                </td>
                                    ...
   </a4j:repeat....

...

我认为您必须从ID属性中删除索引。 它是自动生成的,带有索引

要检查这一点,请运行页面,然后查看页面HTML源代码。 您会发现组件id类似于
--
注意:试着把你的aj:重复在a面