Announcement Announcement Module
Collapse
No announcement yet.
webflow 2.0.6 ManySelectionTrackingListDataModel class bug Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • webflow 2.0.6 ManySelectionTrackingListDataModel class bug

    hi
    I want to report a bug that I found in webflow 2.0.6.

    Suppose that you have scenario like this
    http://forum.springsource.org/attach...1&d=1240276482
    so you must use ManySelectionTrackingListDataModel for handling check Box click:
    userAdd-flow.xml:
    Code:
    ...
    <evaluate expression="userForm.getRoleList(messageContext)" result="flowScope.roles" result-type="org.springframework.faces.model.ManySelectionTrackingListDataModel" />
    ...
    userEdit.xhtml:
    Code:
    ...
    <h:selectBooleanCheckbox id="selector" value="#{roles.currentRowSelected}"/>
    ...
    when you click confirm button all of selected check box will be cleared:
    http://forum.springsource.org/attach...1&d=1240276482
    because of implementation of setCurrentRowSelected in ManySelectionTrackingListDataModel :
    Code:
    public void setCurrentRowSelected(boolean rowSelected) {
    		if (!isRowAvailable()) {
    			return;
    		}
    		if (rowSelected && !selections.contains(getRowData())) {
    		    selections.add(getRowData());
    		}
    		else {
    		    selections.remove(getRowData());
    		}
    	}
    I changed this method to this:
    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());
    		}
    	}
    and now it works very good.

    so is there anyone who have better solution for this scenario?
    Last edited by alireza; Apr 20th, 2009, 10:51 AM.

  • #2
    Any relation to this known bug? It's corrected in 2.0.7, which was just released. Try out 2.0.7 and see if the problem still exists.

    Comment

    Working...
    X