hi
I want to report a bug that I found in webflow 2.0.6.
Suppose that you have scenario like this
so you must use ManySelectionTrackingListDataModel for handling check Box click:
userAdd-flow.xml:
userEdit.xhtml:Code:... <evaluate expression="userForm.getRoleList(messageContext)" result="flowScope.roles" result-type="org.springframework.faces.model.ManySelectionTrackingListDataModel" /> ...
when you click confirm button all of selected check box will be cleared:Code:... <h:selectBooleanCheckbox id="selector" value="#{roles.currentRowSelected}"/> ...
because of implementation of setCurrentRowSelected in ManySelectionTrackingListDataModel :
I changed this method to this:Code:public void setCurrentRowSelected(boolean rowSelected) { if (!isRowAvailable()) { return; } if (rowSelected && !selections.contains(getRowData())) { selections.add(getRowData()); } else { selections.remove(getRowData()); } }
and now it works very good.Code:public void setCurrentRowSelected(boolean rowSelected) { if (!isRowAvailable()) { return; } if (rowSelected && !selections.contains(getRowData())) { selections.add(getRowData()); } else if (!rowSelected && selections.contains(getRowData())) { selections.remove(getRowData()); } }
so is there anyone who have better solution for this scenario?


Reply With Quote
