0

I would like to bound the getAddress method of the Profile class to a repeat control to display the values.

From what I understand is that the getAddress method returns an object and not a map. Otherwise I could have tried:

<xp:repeat id="repeat1" rows="30"
                value="#{javascript:ServiceBean.getMyProfile().getAddress()}" var="rowData" indexVar="rowIndex">
                <xp:panel>
                    <xp:text escape="true" id="computedField10">
                        <xp:this.value><![CDATA[#{javascript:rowData.getKey()}]]></xp:this.value>
                    </xp:text>-
                    <xp:text escape="true" id="computedField11" value="#{javascript:rowData.getValue()}">
                    </xp:text>
                <xp:br></xp:br></xp:panel>
            </xp:repeat>

What can I try instead/how to handle the returned object?

Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26
  • Patrick, not sure I understand. The repeat control expects lists of objects. So if getAddress doesn't return a list it won't work. You could implement your own bean using the SDK Java API to read all addresses you want, put them in a list and bind that list to the repeat control. – Niklas Heidloff Jun 05 '14 at 13:02
  • I think getAddress returns a list of objects. If you bind it to a repeat control with var rowData and return the rowData e.g. in a computed text you get returned: streetAddress, countryName, locality, region, postalCode, extendedAddress. However how to retrieve the values from these objects within the repeat control is not clear to me. – Patrick Kwinten Jun 09 '14 at 08:35

0 Answers0