Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There have been issues and discussions about having a DataModel implementation in the spec for java.util.Set. This is certainly a good thing. Better though, would be to have a way (via annotation and/or faces-config.xml) to register an implementation and the type of Object it supports. This would clean up code in UIData and also allow for expansions of DataModel types without having to update the spec.

      1. changebundle.txt
        17 kB
        arjan tijms
      2. changebundle.txt
        76 kB
        arjan tijms
      3. changebundle3.txt
        13 kB
        arjan tijms
      4. changebundle4.txt
        4 kB
        arjan tijms

        Issue Links

          Activity

          lightguard created issue -
          Ed Burns made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          Ed Burns made changes -
          Assignee Ed Burns [ edburns ]
          Ed Burns made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Ed Burns made changes -
          Resolution Won't Fix [ 2 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ed Burns made changes -
          Fix Version/s 2.3 [ 16372 ]
          Ed Burns made changes -
          Comment [ Out of scope for 2.3 ]
          Hide
          Ed Burns added a comment -

          Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

          Show
          Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
          Ed Burns made changes -
          Priority Minor [ 4 ] Trivial [ 5 ]
          Fix Version/s 2.3 [ 16372 ]
          Ed Burns made changes -
          Priority Trivial [ 5 ] Minor [ 4 ]
          arjan tijms made changes -
          arjan tijms made changes -
          Attachment changebundle.txt [ 54975 ]
          Attachment newfiles.zip [ 54976 ]
          Hide
          arjan tijms added a comment -

          Expanded @FacesDataModel support to UIRepeat

          Show
          arjan tijms added a comment - Expanded @FacesDataModel support to UIRepeat
          arjan tijms made changes -
          Attachment changebundle.txt [ 55012 ]
          Attachment newfiles.zip [ 55013 ]
          Hide
          arjan tijms added a comment -

          Applied to 2.3 trunk,
          svn commit -m "Initial commit for https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078, Have DataModel implementations registerable, r=mriem"
          Sending jsf-api/src/main/java/javax/faces/component/UIData.java
          Adding jsf-api/src/main/java/javax/faces/model/FacesDataModel.java
          Sending jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java
          Sending jsf-ri/src/main/java/com/sun/faces/cdi/CdiUtils.java
          Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesMapProducer.java
          Adding jsf-ri/src/main/java/com/sun/faces/cdi/FacesDataModelAnnotationLiteral.java
          Sending jsf-ri/src/main/java/com/sun/faces/facelets/component/UIRepeat.java
          Adding test/javaee8/facelets
          Adding test/javaee8/facelets/pom.xml
          Adding test/javaee8/facelets/src
          Adding test/javaee8/facelets/src/main
          Adding test/javaee8/facelets/src/main/java
          Adding test/javaee8/facelets/src/main/java/com
          Adding test/javaee8/facelets/src/main/java/com/sun
          Adding test/javaee8/facelets/src/main/java/com/sun/faces
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child1.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child11.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child111.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child11Model.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child1Model.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child21.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child21Model.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2Model.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/DataBacking.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Parent.java
          Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/ParentModel.java
          Adding test/javaee8/facelets/src/main/webapp
          Adding test/javaee8/facelets/src/main/webapp/WEB-INF
          Adding test/javaee8/facelets/src/main/webapp/WEB-INF/beans.xml
          Adding test/javaee8/facelets/src/main/webapp/WEB-INF/glassfish-web.xml
          Adding test/javaee8/facelets/src/main/webapp/WEB-INF/web.xml
          Adding test/javaee8/facelets/src/main/webapp/datatableCustomDataModel11.xhtml
          Adding test/javaee8/facelets/src/main/webapp/datatableCustomDataModel111.xhtml
          Adding test/javaee8/facelets/src/main/webapp/uirepeatCustomDataModel11.xhtml
          Adding test/javaee8/facelets/src/main/webapp/uirepeatCustomDataModel111.xhtml
          Adding test/javaee8/facelets/src/test
          Adding test/javaee8/facelets/src/test/java
          Adding test/javaee8/facelets/src/test/java/com
          Adding test/javaee8/facelets/src/test/java/com/sun
          Adding test/javaee8/facelets/src/test/java/com/sun/faces
          Adding test/javaee8/facelets/src/test/java/com/sun/faces/test
          Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8
          Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets
          Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java
          Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java
          Sending test/javaee8/pom.xml
          Transmitting file data ..............................
          Committed revision 14837.

          Show
          arjan tijms added a comment - Applied to 2.3 trunk, svn commit -m "Initial commit for https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078 , Have DataModel implementations registerable, r=mriem" Sending jsf-api/src/main/java/javax/faces/component/UIData.java Adding jsf-api/src/main/java/javax/faces/model/FacesDataModel.java Sending jsf-ri/src/main/java/com/sun/faces/cdi/CdiExtension.java Sending jsf-ri/src/main/java/com/sun/faces/cdi/CdiUtils.java Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesMapProducer.java Adding jsf-ri/src/main/java/com/sun/faces/cdi/FacesDataModelAnnotationLiteral.java Sending jsf-ri/src/main/java/com/sun/faces/facelets/component/UIRepeat.java Adding test/javaee8/facelets Adding test/javaee8/facelets/pom.xml Adding test/javaee8/facelets/src Adding test/javaee8/facelets/src/main Adding test/javaee8/facelets/src/main/java Adding test/javaee8/facelets/src/main/java/com Adding test/javaee8/facelets/src/main/java/com/sun Adding test/javaee8/facelets/src/main/java/com/sun/faces Adding test/javaee8/facelets/src/main/java/com/sun/faces/test Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8 Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child1.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child11.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child111.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child11Model.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child1Model.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child21.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child21Model.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2Model.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/DataBacking.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Parent.java Adding test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/ParentModel.java Adding test/javaee8/facelets/src/main/webapp Adding test/javaee8/facelets/src/main/webapp/WEB-INF Adding test/javaee8/facelets/src/main/webapp/WEB-INF/beans.xml Adding test/javaee8/facelets/src/main/webapp/WEB-INF/glassfish-web.xml Adding test/javaee8/facelets/src/main/webapp/WEB-INF/web.xml Adding test/javaee8/facelets/src/main/webapp/datatableCustomDataModel11.xhtml Adding test/javaee8/facelets/src/main/webapp/datatableCustomDataModel111.xhtml Adding test/javaee8/facelets/src/main/webapp/uirepeatCustomDataModel11.xhtml Adding test/javaee8/facelets/src/main/webapp/uirepeatCustomDataModel111.xhtml Adding test/javaee8/facelets/src/test Adding test/javaee8/facelets/src/test/java Adding test/javaee8/facelets/src/test/java/com Adding test/javaee8/facelets/src/test/java/com/sun Adding test/javaee8/facelets/src/test/java/com/sun/faces Adding test/javaee8/facelets/src/test/java/com/sun/faces/test Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8 Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java Adding test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java Sending test/javaee8/pom.xml Transmitting file data .............................. Committed revision 14837.
          Hide
          Manfred Riem added a comment -

          Can you please address the following PMD issues

          UIRepeat.java:61, UnusedImports, Priority: Normal
          Avoid unused imports such as 'com.sun.faces.cdi.CdiUtils'.

          DataModelClassesMapProducer.java:40, TooManyStaticImports, Priority: Normal
          Too many static imports may lead to messy code.

          Note it might be better to move the @interface into its own file instead of doing it as an inner class.

          Show
          Manfred Riem added a comment - Can you please address the following PMD issues UIRepeat.java:61, UnusedImports, Priority: Normal Avoid unused imports such as 'com.sun.faces.cdi.CdiUtils'. DataModelClassesMapProducer.java:40, TooManyStaticImports, Priority: Normal Too many static imports may lead to messy code. Note it might be better to move the @interface into its own file instead of doing it as an inner class.
          Manfred Riem made changes -
          Assignee arjan tijms [ arjan_t ]
          Hide
          arjan tijms added a comment -

          Avoid unused imports such as 'com.sun.faces.cdi.CdiUtils'.

          I'll look at this one right away. I have the same checks running locally but this one slipped through (likely because of some noise regarding a couple of existing warnings)

          DataModelClassesMapProducer.java:40, TooManyStaticImports, Priority: Normal
          Too many static imports may lead to messy code.

          I'll take a look at this one too. What's the limit currently set too?

          Note that for JDK8 code we may want to increase the limit or remove the rule (if possible). JDK8 code puts a lot more emphasis on static imports and this is considered good practice. The PMD rule is likely still based on JDK5 style code. JDK8 provides a lot of goodies in utility classes such as Collectors (e.g; Collectors::toList that typical code does not write out fully (see basically all Oracle examples for Stream based code).

          Note it might be better to move the @interface into its own file instead of doing it as an inner class.

          Do you mean DataModelClassesMapProducer.DataModelClasses here? The initial idea was to keep it private to the parent class, since it was just a way to prevent an ambiguous situation when injecting Map. Code in the API project obtains the map by name only, so no new types were needed to be introduced there.

          However, UIRepeat is in the impl project and could make use of utility code, so it may make sense indeed now to move it to a top level class. Additionally, if/when the API project can make use of utility code this would also allow it to obtain the map in a more strongly typed way.

          Show
          arjan tijms added a comment - Avoid unused imports such as 'com.sun.faces.cdi.CdiUtils'. I'll look at this one right away. I have the same checks running locally but this one slipped through (likely because of some noise regarding a couple of existing warnings) DataModelClassesMapProducer.java:40, TooManyStaticImports, Priority: Normal Too many static imports may lead to messy code. I'll take a look at this one too. What's the limit currently set too? Note that for JDK8 code we may want to increase the limit or remove the rule (if possible). JDK8 code puts a lot more emphasis on static imports and this is considered good practice. The PMD rule is likely still based on JDK5 style code. JDK8 provides a lot of goodies in utility classes such as Collectors (e.g; Collectors::toList that typical code does not write out fully (see basically all Oracle examples for Stream based code). Note it might be better to move the @interface into its own file instead of doing it as an inner class. Do you mean DataModelClassesMapProducer.DataModelClasses here? The initial idea was to keep it private to the parent class, since it was just a way to prevent an ambiguous situation when injecting Map . Code in the API project obtains the map by name only, so no new types were needed to be introduced there. However, UIRepeat is in the impl project and could make use of utility code, so it may make sense indeed now to move it to a top level class. Additionally, if/when the API project can make use of utility code this would also allow it to obtain the map in a more strongly typed way.
          arjan tijms made changes -
          Attachment changebundle3.txt [ 55020 ]
          Attachment newfiles3.zip [ 55021 ]
          Hide
          arjan tijms added a comment -

          Applied to 2.3 trunk,
          svn commit -m "https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078, Several cleanups, r=mriem"
          Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClasses.java
          Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesAnnotationLiteral.java
          Sending jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesMapProducer.java
          Sending jsf-ri/src/main/java/com/sun/faces/facelets/component/UIRepeat.java
          Sending test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2Model.java
          Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java
          Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java
          Transmitting file data .......
          Committed revision 14843.

          Show
          arjan tijms added a comment - Applied to 2.3 trunk, svn commit -m "https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078, Several cleanups, r=mriem" Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClasses.java Adding jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesAnnotationLiteral.java Sending jsf-ri/src/main/java/com/sun/faces/cdi/DataModelClassesMapProducer.java Sending jsf-ri/src/main/java/com/sun/faces/facelets/component/UIRepeat.java Sending test/javaee8/facelets/src/main/java/com/sun/faces/test/javaee8/facelets/Child2Model.java Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java Transmitting file data ....... Committed revision 14843.
          arjan tijms made changes -
          Attachment changebundle4.txt [ 55026 ]
          Hide
          arjan tijms added a comment -

          Applied to 2.3 trunk,
          svn commit -m "https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078, Excluded tests for WLS 12.2.1, r=mriem"
          Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java
          Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java
          Transmitting file data ..
          Committed revision 14861.

          Show
          arjan tijms added a comment - Applied to 2.3 trunk, svn commit -m "https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1078, Excluded tests for WLS 12.2.1, r=mriem" Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/DataTableCustomDataModelIT.java Sending test/javaee8/facelets/src/test/java/com/sun/faces/test/javaee8/facelets/UIRepeatCustomDataModelIT.java Transmitting file data .. Committed revision 14861.
          arjan tijms made changes -
          Summary Have DataModel implementations registerable Have DataModel implementations registrable
          arjan tijms made changes -
          Manfred Riem made changes -
          Priority Minor [ 4 ] Critical [ 2 ]

            People

            • Assignee:
              arjan tijms
              Reporter:
              lightguard
            • Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: