Hi all, when using immediate="true" for a tr:table sorting is done by the values, not by the submittedValues. This IMHO is not nice, but ok. But if there is also a tr:commandButton with immediate="true" for deleting a row of the table, then after adding a row, sorting without submitting in between and deleting a row (also without submitting, because commandButton has immediate="true" as mentioned above) you will get a
javax.el.PropertyNotFoundException: side.xhtml @51,98 value="#{row.property1.property2}": Target Unreachable, identifier 'row' resolved to null at com.sun.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:84) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:244) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.renderAsElement(FormElementRenderer.java:217) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.getLabelFor(InputLabelAndMessageRenderer.java:78) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer$Label.getForId(LabelAndMessageRenderer.java:727) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputLabelRenderer.encodeAll(OutputLabelRenderer.java:90) at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:335) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:227) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:124) at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:763) at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.encodeAll(ColumnRenderer.java:96) at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:763) at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer._renderRegularColumns(DesktopTableRenderer.java:998) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderSingleRow(DesktopTableRenderer.java:111) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer$1.processRowImpl(DesktopTableRenderer.java:861) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.processRow(TableUtils.java:117) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.loop(TableUtils.java:103) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.run(TableUtils.java:75) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer._renderTableRows(DesktopTableRenderer.java:912) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableRows(DesktopTableRenderer.java:638) at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableContent(DesktopTableRenderer.java:364) at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.encodeAll(TableRenderer.java:375) at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:763) at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:533) because SortableModel._toBaseIndex(int) will return a no longer existing index. Calling "aSortableModel.setSortCriteria(aSortableModel.getSortCriteria())" does not help, because nothing is done if the sortCriteria has not changed. I now helped myself by memorizing "List<SortCriterion> memorizedSortCriteria = aSortableModel.getSortCriteria();" and calling "aSortableModel.setSortCritera(null); aSortableModel.setSortableModel(memorizedSortableModel);". Maybe it would be a good thing to have table sorted by submittedValues. What do you think? Regards, Marco -- View this message in context: http://www.nabble.com/-Trinidad--sorting-a-tr%3Atable-with-immediate%3D%22true%22-sorts-by-values-not-by-submittedValues-and-leeds-to-exception-when-deleting-a-row-immediate-without-resorting-tp22681422p22681422.html Sent from the MyFaces - Users mailing list archive at Nabble.com.