Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.0.0.GA_P01, 3.2.BETA1
-
Fix Version/s: EE-3.2.0.BETA, EE-3.2.0.GA, 3.3
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces
-
Assignee Priority:P2
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
Description
Apparently our window scope does not work very well with FileEntryCallback. I suspect that a scope does not work here for the same reason the View scoped FileEntryCallback throwing an NPE in my sample app. This JIRA was created to address this issue if possible.
Based on initial analysis of the problem the fileEntry upload is processed before restore view, which is when view scope is setup. Possibly window scope is as well, and possibly fileEntry can initialize window scope earlier in order to work with the callback.
The desired behavior should be similar to the @SessionScoped or @AplicationScoped FileEntryCallback bean.
To see the issue use the source code and change the scope of the FileEntryCallbackImpl bean from session to view or window scoped.
Introduced public method WindowScopeManager.associateWindowIDToRequest that can be used by components that need access to window scoped beans before the request is completely read in. This method is used now by FileEntryResourceHandler to associated sooner the windowID with the current request thus ensuring that the correct scope map is looked up by the WindowELResolver.
This approach was necessary because the WindowScopeManager normally associates the windowID to the current request later, during restore phase. The windowID needs to be associated sooner because the window scoped callback needs looked up just before the upload is executed.