0 Replies Latest reply on Apr 16, 2007 7:19 AM by Sander Mak

    EL-enhancements implementation question

    Sander Mak Newbie

      Is it correct that the el-enhancements use the index of an object in the List that backs the h:datatable? E.g. :

      <h:dataTable value="#{blogList.entries}" var="entry" >
       <f:facet name="header">Title</f:facet>
       <h:outputText value="#{entry.title}"/>
       <f:facet name="header">Action</f:facet>
       <h:commandButton value="Delete" action="#{blogList.delete(entry)}"/>

      blogList.entries contains a statement that returns a new ArrayList(someSet), so the order of the ArrayList is not deterministic and changes between requests. When invoking the delete action, not the object identity of entry but it's location in the list determines what entry gets deleted... Not a big problem (work around is to fix the ordering of the set), just wanted to see whether this could be improved since it counters the intuition of normal call-by-reference which is implied by the notation.