English 中文(简体)
Inner UI:repeat does not bind to a bean in a nested UI:repeat
原标题:

HI, I am using nested ui:repeats to display my data. the outer UI:repeat works and binds to bean just fine, but the inner does not bind to the bean. In sumary, I would like to display a list of people where each person has a name and a list of email addresses. Here is my code:

<ui:repeat value="#{myFamily.personList}" var="eachPerson" >
  <tr:panelCaptionGroup captionText="#{eachPerson.name}" styleClass="fullWidth">
    <h:inputText value="#{eachPerson.age}" styleClass="fullWidth" />    
    <ui:repeat value="#{eachPerson.emailList}" var="eachEmail" >
      <h:panelGrid columns="2">
        <h:outputLabel value="#{eachEmail.type}:" styleClass="darkBlue label" />
        <h:inputText value="#{eachEmail.email}" maxlength="40" size="38" />
      </h:panelGrid>
    </ui:repeat>
  </tr:panelCaptionGroup>
</ui:repeat>

The binding to the personList was fine since I had tested by changing the age of each person and the model changed after I submit. However, the emails list is not changed no matter what I change on the screen.

Please help! I am using JSF, Spring Web Flow, Facelets, and Trinidad.

最佳回答

Thank you for you quick response. After spending some time on google, I found out that nested UI:repeat is well suported. You can use different alternatives like tr:iterator, c:forEach, and/or tr:forEach.

One thing I d like to clearify that c:forEach and ui:repeat do bind values to the backing beans and well supported in jsf and facelets.

问题回答

暂无回答




相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...

热门标签