[JBoss JIRA] Resolved: (RF-4798) SequenceDataModel.walk(...) Fires DataModelEvent for Each row instead of a only 1!
by Nick Belaevski (JIRA)
[ https://jira.jboss.org/jira/browse/RF-4798?page=com.atlassian.jira.plugin... ]
Nick Belaevski resolved RF-4798.
--------------------------------
Resolution: Won't Fix
Assignee: Tsikhon Kuprevich
Not a bug
> SequenceDataModel.walk(...) Fires DataModelEvent for Each row instead of a only 1!
> ----------------------------------------------------------------------------------
>
> Key: RF-4798
> URL: https://jira.jboss.org/jira/browse/RF-4798
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.2
> Environment: Ajax4jsf in RichFaces 3.2.1 & 3.2.2 bundles.
> Reporter: Paul Kossler
> Assignee: Tsikhon Kuprevich
>
> org.ajax4jsf.model.SequenceDataModel.walk(...)
> ...
> while (rows < 0 || currentRow < rows) {
> wrappedModel.setRowIndex(currentRow);
> if(wrappedModel.isRowAvailable()){
> visitor.process(context, new Integer(currentRow), argument);
> } else {
> break;
> }
> currentRow++;
> }
> ...
> Issue: wrappedModel.setRowIndex(currentRow) fires a DataModelEvent for each row in the wrapped model.
> This creates broken behavior for the Event model.
> If you have a listener on a DataModel it gets called for each and every row during PhaseId.APPLY_REQUEST_VALUES
> This makes the model think every row gets selected for each cycle!
> NOTE: The org.richfaces.model.SequenceDataModel.walk is implemented with out this.
> Its seems to me that the latter model handles this the general wrappedData access issue cleanly by copying the Collection ObjectReferences into an iterable list.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month
[JBoss JIRA] Commented: (RF-4798) SequenceDataModel.walk(...) Fires DataModelEvent for Each row instead of a only 1!
by Nick Belaevski (JIRA)
[ https://jira.jboss.org/jira/browse/RF-4798?page=com.atlassian.jira.plugin... ]
Nick Belaevski commented on RF-4798:
------------------------------------
If you have a listener on a DataModel it gets called for each and every row during PhaseId.APPLY_REQUEST_VALUES
This makes the model think every row gets selected for each cycle! - You are right, every row gets selected during APPLY_REQUEST_VALUES phase. That's the way how iteration components work. The same behavior is reproduced for ordinary h:dataTable.
> SequenceDataModel.walk(...) Fires DataModelEvent for Each row instead of a only 1!
> ----------------------------------------------------------------------------------
>
> Key: RF-4798
> URL: https://jira.jboss.org/jira/browse/RF-4798
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.2
> Environment: Ajax4jsf in RichFaces 3.2.1 & 3.2.2 bundles.
> Reporter: Paul Kossler
>
> org.ajax4jsf.model.SequenceDataModel.walk(...)
> ...
> while (rows < 0 || currentRow < rows) {
> wrappedModel.setRowIndex(currentRow);
> if(wrappedModel.isRowAvailable()){
> visitor.process(context, new Integer(currentRow), argument);
> } else {
> break;
> }
> currentRow++;
> }
> ...
> Issue: wrappedModel.setRowIndex(currentRow) fires a DataModelEvent for each row in the wrapped model.
> This creates broken behavior for the Event model.
> If you have a listener on a DataModel it gets called for each and every row during PhaseId.APPLY_REQUEST_VALUES
> This makes the model think every row gets selected for each cycle!
> NOTE: The org.richfaces.model.SequenceDataModel.walk is implemented with out this.
> Its seems to me that the latter model handles this the general wrappedData access issue cleanly by copying the Collection ObjectReferences into an iterable list.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month