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



Jun 15, 2011, 5:21 PM
23 Posts

Re: repeat control, bound to bean and row count

  • Category: Other
  • Platform: Not Applicable
  • Release: 8.5.1
  • Role: Developer
  • Tags: Repeat Control
  • Replies: 2
 
I have a production solution that does exactly what you are doing and I found the only way to get the repeats to work with the bean was to actually call a method that returned the collection to process.

So I have a method on the bean called getTableRows which returns a Vector.
 
In the repeat control for the Iteration I use a single line of SSJS like this: theBean.getTableRows()
 
Took me a while to figure it out and I was never able to simply map it using EL.  Maybe someone else has though.
 
Hope this helps.
Jun 15, 2011, 7:12 PM
13 Posts
Re: repeat control, bound to bean and row count
Russel,
 
THanks for your reply.

Well wadda-ya-know...
 
I switched from EL...

<xp:repeat
                            id="repeat3"
                            value="#{vAuditDocs.EventDatas}"
                            var="vAuditDocsItems"
                            indexVar="vAuditDocsItemIndex"
                            rows="#{vAuditDocs.FIELDS_FOUND_COUNT}">
 
...to SSJS on the rows...
<xp:repeat
                            id="repeat3"
                            value="#{vAuditDocs.EventDatas}"
                            var="vAuditDocsItems"
                            indexVar="vAuditDocsItemIndex"
                            rows="#{javascript:vAuditDocs.FIELDS_FOUND_COUNT}">
 
...and it works!!!
 
As a side note, I wonder if it really even matters on the "rows", I guess it should be sort of hard coded, I suppose if my backing bean went AWOL and 1 table had 10,000 elements, my code above will just say, OK, keep going until end of table...which would be bad, a constant threshold  of 500, or whatever, would at least safe guard against this.
 
I can't think why EL shouldn't work, but whatever, many, many thanks for your help.
 
 

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