Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accessing an array element from VO attribute with EL

Dl0-OracleApr 6 2010 — edited Apr 6 2010
Hey guys,

I'm trying to iterate through the elements in an array with EL.
Normally, #{array[index]} works just fine with lists/array from a java bean, but when the data source is a VO attribute of type array, this does not work (I just get a blank string).

My VO looks like this:
Name - String
NumValues - Integer
ColumnNames - Array (oracle.jbo.domain.Array) of String elements
Values - Array (oracle.jbo.domain.Array) of Strings elements

I'm trying to iterate through Values inside a table:
<af:table value="#{bindings.MyVO.collectionModel}"
                             var="row"
                             rows="#{bindings.MyVO.rangeSize}"
                             rowBandingInterval="0"
                             selectedRowKeys="#{bindings.MyVO.collectionModel.selectedRow}"
                             selectionListener="#{bindings.MyVO.collectionModel.makeCurrent}"
                             rowSelection="single" id="t3"
     <af:column sortProperty="Name" sortable="false"
                      headerText="Name" id="c6">
                      <af:outputText value="#{row.Name}" id="ot8"/>
     </af:column>
     <af:forEach begin="0" end="#{row.NumValues}" varStatus="index">
                      <af:column sortProperty="blah" sortable="false"
                                   headerText="blah" id="c11">
                                <af:outputText value="#{row.Values[index.current]}" id="ot12"/>
                      </af:column>
     </af:forEach>   

</af:table>
I've also tried appending inputValue to #{row.Values[index.current]}, which results in the same blank string.

Is there a special EL syntax to access VO array elements?
Or EL doesn't understand oracle.jbo.domain.Array?

No luck on google yet. Hope you guys can help me out.

I'm using jdev 11g R1 if that's relevant.

Thanks,

Edited by: user755901 on Apr 6, 2010 4:21 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2010
Added on Apr 6 2010
0 comments
838 views