ICEfaces
  1. ICEfaces
  2. ICE-9987

ResourceRegistry does not handle all scoped resources

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0, EE-3.3.0.GA_P04
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      ResourceRegistry does not handle properly resources that are not session or application scoped. It seems that the handling for the other scopes was never implemented.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Affects Version/s 4.0.BETA [ 10770 ]
        Mircea Toma made changes -
        Fix Version/s 4.0 [ 11382 ]
        Mircea Toma made changes -
        Description ResourceRegistry does not handle properly resources that are not session scoped. It seems that the handling for the other scopes was never implemented. ResourceRegistry does not handle properly resources that are not session or application scoped. It seems that the handling for the other scopes was never implemented.
        Ken Fyten made changes -
        Affects Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ]
        Assignee Priority P2 [ 10011 ]
        Component/s ACE-Components [ 10050 ]
        Hide
        Mircea Toma added a comment -

        After doing the analysis of how resources are served and some debugging for confirmation I can definitely affirm that flash, view and window scoped resources cannot be properly looked up when requested.
        The reason is that the request for resource is processed outside the JSF lifecycle. For example the view scoped beans cannot be looked up because the view map does not exist since a view root object is not created. Same goes for window and flash scoped resources. The application and session scoped bean do work because the application and session can be identified from the resource request.

        Show
        Mircea Toma added a comment - After doing the analysis of how resources are served and some debugging for confirmation I can definitely affirm that flash , view and window scoped resources cannot be properly looked up when requested. The reason is that the request for resource is processed outside the JSF lifecycle. For example the view scoped beans cannot be looked up because the view map does not exist since a view root object is not created. Same goes for window and flash scoped resources. The application and session scoped bean do work because the application and session can be identified from the resource request.
        Hide
        Mircea Toma added a comment - - edited

        The obvious solution to this is to append a new parameter to the resource's URL which will identify the scope instance on the server. In the case of window scoped resources the window ID is the obvious candidate. For view scoped resources the ViewState string can be used, but restoring the state of the view root (and consequently its view map) can cause performance issues when lots of resources are looked up.

        Show
        Mircea Toma added a comment - - edited The obvious solution to this is to append a new parameter to the resource's URL which will identify the scope instance on the server. In the case of window scoped resources the window ID is the obvious candidate. For view scoped resources the ViewState string can be used, but restoring the state of the view root (and consequently its view map) can cause performance issues when lots of resources are looked up.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41284 Wed Jun 04 11:26:49 MDT 2014 mircea.toma ICE-9987 Implemented window and view resource lookup.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/application/ResourceRegistry.java
        Hide
        Mircea Toma added a comment -

        Implemented resource lookup for window and view scopes. Previously the resources could not be located since the previous implementation was relying on the continuous existence of the view map or the window scope. To solve the issue URL parameters where added to the resource request URL to help with the finding of the correct scope map, even after the JSF lifecycle that rendered the page (referencing the resources) has ended.

        Show
        Mircea Toma added a comment - Implemented resource lookup for window and view scopes. Previously the resources could not be located since the previous implementation was relying on the continuous existence of the view map or the window scope. To solve the issue URL parameters where added to the resource request URL to help with the finding of the correct scope map, even after the JSF lifecycle that rendered the page (referencing the resources) has ended.
        Hide
        Mircea Toma added a comment -

        Removed the ability to register resources in flash scope because flash is not setup the same way the other scopes are working. There cannot be beans that are flash scoped, there is only a "flash" EL variable provided by JSF which has the properties of a Map.

        Show
        Mircea Toma added a comment - Removed the ability to register resources in flash scope because flash is not setup the same way the other scopes are working. There cannot be beans that are flash scoped, there is only a "flash" EL variable provided by JSF which has the properties of a Map.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41285 Wed Jun 04 12:35:58 MDT 2014 mircea.toma ICE-9987 Removed usages of ResourceRegistry.addFlashResource method.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/graphicimage/GraphicImage.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/mobi/camcorder/CamcorderBean.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dynamicresource/DynamicResource.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41286 Wed Jun 04 12:38:07 MDT 2014 mircea.toma ICE-9987 Added page for testing all the scopes the dynamic resources can be in.
        Files Changed
        Commit graph ADD /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/webapp/test-resource-creation.xhtml
        Commit graph DEL /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/webapp/test.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/webapp/index.jsp
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/java/org/icefaces/demo/dynamicResource/Entry.java
        Commit graph ADD /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/webapp/test-resource-scope.xhtml
        Commit graph ADD /icefaces4/trunk/icefaces/samples/core/test/dynamicResource/src/main/webapp/test.html
        Hide
        Mircea Toma added a comment -

        Modified icefaces/samples/core/test/dynamicResource application to include tests for all the scopes the dynamic resources can be in.

        Show
        Mircea Toma added a comment - Modified icefaces/samples/core/test/dynamicResource application to include tests for all the scopes the dynamic resources can be in.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41777 Mon Jul 14 16:06:33 MDT 2014 mircea.toma ICE-9987 Removed usages of ResourceRegistry.addFlashResource method.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/graphicimage/GraphicImage.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Mircea Toma [ mircea.toma ] Judy Guglielmin [ judy.guglielmin ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P04 [ 12270 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45955 Thu Sep 10 13:36:49 MDT 2015 judy.guglielmin ICE-9987 remove flash scope from ResourceRegistry
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/graphicimage/GraphicImageRenderer.java
        Hide
        Judy Guglielmin added a comment -

        rev. 45969

        Show
        Judy Guglielmin added a comment - rev. 45969
        Judy Guglielmin made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces ee- 3.3.0 maintenance branch r45992 using the icefaces/samples/core/test/dynamicResource test app. Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 45.

        Show
        Liana Munroe added a comment - Verified ICEfaces ee- 3.3.0 maintenance branch r45992 using the icefaces/samples/core/test/dynamicResource test app. Tomcat 7, IE 11, 10, 9, 8, 7, FF 34, Chrome 45.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: