You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2007/10/22 19:30:50 UTC

[jira] Created: (TRINIDAD-782) problem with filtering a sortable table

problem with filtering a sortable table
---------------------------------------

                 Key: TRINIDAD-782
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 1.0.3-core
            Reporter: Gerhard Petracek


SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571587#action_12571587 ] 

Gerhard Petracek commented on TRINIDAD-782:
-------------------------------------------

hello max,

thank you for joining the discussion!
good point. i basically agree with your suggestion. wrapping e.g. a list with SortableModel is my current workaround in such cases.

(at the moment i'm not aware of a scenario in which i had no wrapped data + the need for filtering the data. do you have a real-world example?)

however, if you would like to use the plain data-structure the problem remains.
do you have a suggestion for such a scenario? (maybe we can close this issue.)

the intention of this patch is not to replace the workaround/solution above.
if you have a component binding in place and there is no need to wrap the data manually you have an additional and convenient possibility to force re-indexing after filtering the data (without overhead in all other cases.)
concerning the name of the method i agree - i planned to think about a better choice before committing.

there are several possibilities to solve this issue.

e.g.:
- the provided patch (+ a better method name)
- "frequent" re-indexing ... (-> disadvantage: overhead in all other cases)
- no support for sorting + filtering without wrapping the data. (-> we have to close the issue)
- ...

regards,
gerhard

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>         Attachments: UIXCollection.patch
>
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek updated TRINIDAD-782:
--------------------------------------

    Status: Patch Available  (was: Open)

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Max Starets (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571448#action_12571448 ] 

Max Starets commented on TRINIDAD-782:
--------------------------------------

I find this API misleading, since model refresh behavior is specific to a particular implementation. Not every model will have wrapped data, and if it does not, the proposed API will cause confusion and possible bugs.
If somebody needs to reset wrapped data on their model, they can just call setWrappedData() on the model. Why does table need to be involved?

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>         Attachments: UIXCollection.patch
>
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek updated TRINIDAD-782:
--------------------------------------

    Status: Open  (was: Patch Available)

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571697#action_12571697 ] 

Gerhard Petracek commented on TRINIDAD-782:
-------------------------------------------

hello max,

(
- as i said - we can change the name
- i agree with you that there is no huge burden to wrap data. however, you know what's the issue with opinions... :)
)

aside from that, i have no problem with your suggestion. let's convert: workaround -> suggested approach.
however, we have to document it!

***result of the discussion***
we don't support filtering + sorting without a wrapper.

it's at least the quickest solution :) and we don't have to think about names or an adequate implementation.
-> i'll file a documentation issue.

regards,
gerhard

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>         Attachments: UIXCollection.patch
>
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-782) problem with filtering a sortable table

Posted by "Max Starets (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571663#action_12571663 ] 

Max Starets commented on TRINIDAD-782:
--------------------------------------

Gerhard,

I am glad to be here :)

An example of a model that does not wrap any data is a model that does not delegate its data access to a collection. Oracle's CollectionModel implementation for BC4J (Oracle's business component layer) is one of such models. For model like these, your proposed refreshModelState() with its implementation would have no meaning.

For your example with a component binding and a SortableModel being automatically created by table, perhaps one possible solution is putting refreshModelState() on a subclass of UIXTable returned by the component binding. What do you think?
To be honest, even creating SortableModel explicitly does not seem like a huge burden to me, so I would just close this issue.

Regards,
Max

> problem with filtering a sortable table
> ---------------------------------------
>
>                 Key: TRINIDAD-782
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-782
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core
>            Reporter: Gerhard Petracek
>         Attachments: UIXCollection.patch
>
>
> SortableModel: missing re-indexing of a sorted model after model content has been filtered/changed (alternative: reset indices)
> further details: http://www.mail-archive.com/users@myfaces.apache.org/msg43802.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.