This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 19, 2011, 10:51 AM
29 Posts

Repeat within repeat control, data binding issue

  • Category: Other
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: repeat control
  • Replies: 4
 Hi, guys!
 
Today :-) I have the following issue:

I have a repeat control which returns an array. Collection name is : collection1. 
It has another repeat control inside which takes the value of the current array element of collection1 and populates itself with documents with FTsearch method based on current array element (a kind of categorization analogue).
 
The error I get is the following: 
the second repeat control says: " 'collection1' not found"
 
What may be the problem? 
Thanks!
Ruslan 
Apr 19, 2011, 2:27 PM
57 Posts
Re: Repeat within repeat control, data binding issue
what is your "collection1" exactly, name/id/value of repeat control? or datasource that parent repeat control interator points to?
 
<xp:repeat id="repeat1" rows="30"
                    value="#{javascript:getArray();}" var="row"
                    indexVar="rowIndex">
                   <xp:repeat id="repeat2" rows="30"
                        value="#{javascript:return row;}">
                        something
                    </xp:repeat>

</xp:repeat>

nested repeat control should refer to "row" from parent repeat control as its own datasource...
Apr 20, 2011, 6:57 AM
29 Posts
Re: Repeat within repeat control, data binding issue
 collection1 is name of the collection of the parent repeatControl. In your example that would be 'row'.
 
Apr 20, 2011, 7:29 AM
57 Posts
Re: Repeat within repeat control, data binding issue
 
if syntax is right, then should check if "collection1" is really null or not, but you must have done that
or return a vector instead of a array, vector can be regonized by SSJS, but array can't, i guess, tried a couple times
Apr 20, 2011, 7:48 AM
29 Posts
Re: Repeat within repeat control, data binding issue
ok, I'll try to do that
Thanks 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal