You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "John Fan (JIRA)" <ad...@incubator.apache.org> on 2007/02/14 18:17:05 UTC
[jira] Created: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
SortableModel.getRowKey() returns sortedIndex
---------------------------------------------
Key: ADFFACES-382
URL: https://issues.apache.org/jira/browse/ADFFACES-382
Project: MyFaces ADF-Faces
Issue Type: Bug
Environment: ALL
Reporter: John Fan
In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "John Fan (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Fan updated ADFFACES-382:
------------------------------
Status: Patch Available (was: Open)
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Environment: ALL
> Reporter: John Fan
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "John Fan (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473160 ]
John Fan commented on ADFFACES-382:
-----------------------------------
Also, the rowKey returned by getRowKey() should be an Integer. It's not necessary to convert between String and int.
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Environment: ALL
> Reporter: John Fan
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "John Fan (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Fan updated ADFFACES-382:
------------------------------
Attachment: RowKeyFixWithAutoBoxing.patch
The difference between this patch and the previous patch is:
1. Removed Integer.valueOf() call, leave the convertion to jdk autoboxing.
2. Added comment to test classes saying the test depends on SortableModel class.
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Environment: ALL
> Reporter: John Fan
> Attachments: RowKeyFix.patch, RowKeyFixWithAutoBoxing.patch
>
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "John Fan (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Fan updated ADFFACES-382:
------------------------------
Attachment: RowKeyFix.patch
This patch is my proposed fix for this issue. It has the following parts:
1. In SortableModel, getRowKey() now returns Integer with base index value (originally it returns string with sorted index value).
2. In SortableModel, setRowKey() accepts Object parameter (originally it accepts String) with base index Integer type value. Other object type will be treated as -1 and error will be logged.
3. The original SortableModel has two lines of code calling new Integer(). They are changed to call Integer.valueOf().
4. RowKeySetImplTest and RowKeySetTreeImplTest was changed to adapt to the changes above. rowKey type changed to Integer and serialization size limit was increased (due to the rowKey type changed from String to Integer).
The SortableModel will have impact to rowKeys in tree/treeTable (change from array of String to array of Integer).
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Environment: ALL
> Reporter: John Fan
> Attachments: RowKeyFix.patch
>
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Winer updated ADFFACES-382:
--------------------------------
Resolution: Fixed
Assignee: Adam Winer
Status: Resolved (was: Patch Available)
Fixed.
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Environment: ALL
> Reporter: John Fan
> Assigned To: Adam Winer
> Attachments: RowKeyFix.patch, RowKeyFixWithAutoBoxing.patch
>
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-382) SortableModel.getRowKey() returns
sortedIndex
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf updated ADFFACES-382:
----------------------------------------
Fix Version/s: 1.0.1-incubating-core-SNAPSHOT
Affects Version/s: 1.0.1-incubating-core-SNAPSHOT
> SortableModel.getRowKey() returns sortedIndex
> ---------------------------------------------
>
> Key: ADFFACES-382
> URL: https://issues.apache.org/jira/browse/ADFFACES-382
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Affects Versions: 1.0.1-incubating-core-SNAPSHOT
> Environment: ALL
> Reporter: John Fan
> Assigned To: Adam Winer
> Fix For: 1.0.1-incubating-core-SNAPSHOT
>
> Attachments: RowKeyFix.patch, RowKeyFixWithAutoBoxing.patch
>
>
> In SortableModel class, getRowKey() returns sorted index of the current row. For the same row object, different sorting can change its sorted index and hence change its rowKey.
> getRowKey() should return base index, because base index of a row object will not be changed by sorting. If we change getRowKey(), we need to change setRowKey() too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.