You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Low Heng Sin (JIRA)" <my...@incubator.apache.org> on 2005/06/20 12:05:20 UTC

[jira] Created: (MYFACES-286) x:datatable doesn't support Set

x:datatable doesn't support Set
-------------------------------

         Key: MYFACES-286
         URL: http://issues.apache.org/jira/browse/MYFACES-286
     Project: MyFaces
        Type: Bug
    Versions: Nightly Build    
    Reporter: Low Heng Sin
 Attachments: HtmlDataTableHack.patch

x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-286?page=all ]
     
Bruno Aranda closed MYFACES-286:
--------------------------------

    Fix Version: 1.0.10m10
     Resolution: Won't Fix

Although it may be an unpopular decision, I think we should do only what it is specified in this case, because this will make transparent a migration from myfaces to RI. If someone used Set in myfaces, he/she should change that if migrated to RI.

The Spec (section 4.1.3.2, p4-8) states:

<<However, a DataModel wrapper instance must automatically be provided by the JSF
implementation if the current value is of one of the following types:
- java.util.List
- Array of java.util.Object
- java.sql.ResultSet (which therefore also supports javax.sql.RowSet)
- javax.servlet.jsp.jstl.sql.Result
- Any other Java object is wrapped by a DataModel instance with a single row.>>

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.10m10
>     Reporter: Low Heng Sin
>     Assignee: Bruno Aranda
>      Fix For: 1.0.10m10
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-286) x:datatable doesn't support Set

Posted by "Sylvain Vieujot (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-286?page=comments#action_12322820 ] 

Sylvain Vieujot commented on MYFACES-286:
-----------------------------------------

I agree with you for h:dataTable, but for x:dataTable, I think it would be a plus to support all collections.
Couldn't we use an extended UIData for this ?

Further more, removing it from x:dataTable might break current applications, and it's quite hard to detect such bugs until you hit them on the live application.

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.10m10
>     Reporter: Low Heng Sin
>     Assignee: Bruno Aranda
>      Fix For: 1.0.10m10
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-286) x:datatable doesn't support Set

Posted by "Low Heng Sin (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-286?page=all ]

Low Heng Sin updated MYFACES-286:
---------------------------------

    Attachment: HtmlDataTableHack.patch

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Low Heng Sin
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-286?page=comments#action_12314518 ] 

Bruno Aranda commented on MYFACES-286:
--------------------------------------

That's true. In order to be consistent with the specification I recommend to remove this feature from UIData. The ability to create DataModels from Collections is not specified and thiscould bring compatibility issues when changing the implementation of JSF of an existing application developed using the myfaces implementation. I would delete this feature from UIData or I would deprecate it(throwing an error or a warning) to allow some time for the users to correct their applications if they are creating dataTables passing a unespecified Collection as a value,

Regards,

Bruno

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Low Heng Sin
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-286?page=comments#action_12322821 ] 

Bruno Aranda commented on MYFACES-286:
--------------------------------------

Well, the thing was, as Low Heng Sin says in a comment, t:dataTable didn't support that whereas h:dataTable did. Maybe, if there is quorum on this, we could add the support to the extended t:dataTable...

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.10m10
>     Reporter: Low Heng Sin
>     Assignee: Bruno Aranda
>      Fix For: 1.0.10m10
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-286?page=all ]
     
Bruno Aranda reopened MYFACES-286:
----------------------------------


The extended t:dataTable will accept Collections...

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.10m10
>     Reporter: Low Heng Sin
>     Assignee: Bruno Aranda
>      Fix For: 1.0.10m10
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-286?page=comments#action_12314428 ] 

Bruno Aranda commented on MYFACES-286:
--------------------------------------

I don't recommend this patch be applied to the extended dataTable as it is an addition of what it is told in the spec (section 4.1.3.2). It says that the value is normally a DataModel, but a DataModel wrapper has to be provided automatically to the following types:

- java.util.List
- Array of java.util.Object
- java.sql.ResultSet (which therefore also supports javax.sql.RowSet)
- javax.servlet.jsp.jstl.sql.Result
- Any other Java object is wrapped by a DataModel instance with a single row.

It would be understood to add such an addition to the myfaces extended component, but IMO it should respect exactly the spec.
You can always convert your Set to List.

Best regards,

Bruno

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Low Heng Sin
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-286) x:datatable doesn't support Set

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-286?page=all ]
     
Bruno Aranda closed MYFACES-286:
--------------------------------

    Resolution: Fixed

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.10m10
>     Reporter: Low Heng Sin
>     Assignee: Bruno Aranda
>      Fix For: 1.0.10m10
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-286) x:datatable doesn't support Set

Posted by "Low Heng Sin (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-286?page=comments#action_12314455 ] 

Low Heng Sin commented on MYFACES-286:
--------------------------------------

I'm fine if this is not supported because of the spec but the other issue is the support for java.util.Set is present in the UIData class of the myfaces implmentation ( check createDataModel()  in UIData ). I've try that, java.util.Set work fine with h:datatable but not x:datatable when running on myfaces implementation ( haven't try on jsf-ri ). To be consistent, that support should to be remove as well.

> x:datatable doesn't support Set
> -------------------------------
>
>          Key: MYFACES-286
>          URL: http://issues.apache.org/jira/browse/MYFACES-286
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Low Heng Sin
>  Attachments: HtmlDataTableHack.patch
>
> x:datatable doesn't support the java.util.Set interface. This is caused by the overriden createDataModel method in HtmlDatatableHack doesn't handle generic java collection interface ( It does in UIData ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira