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" >
| <h:column>
| <f:facet name="header">Title</f:facet>
| <h:outputText value="#{entry.title}"/>
| </h:column>
| ....
| <h:column>
| <f:facet name="header">Action</f:facet>
| <h:commandButton value="Delete"
action="#{blogList.delete(entry)}"/>
| </h:column>
|
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.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037502#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...