Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta2
-
Fix Version/s: 2.0.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ACE
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
Description
When files are being uploaded, the FileEntryPhaseListener should register a dynamic resource, which will be a simple text file that describes the progress as a JSON data structure. The resource should have all the proper HTTP headers for not being cached. The uploading code will poll the progress at some configurable interval, defaulted to every 2 seconds. A client-side progress bar will show the progress per file, and for the upload as a whole. When the DOM update comes, we may have to adjust the FileEntryRenderer to include the progress bars, otherwise they may be stomped over and lost.
Activity
Mark Collette
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Affects | [Documentation (User Guide, Ref. Guide, etc.)] | |
Security | Private [ 10001 ] | |
Assignee | Mark Collette [ mark.collette ] |
Ken Fyten
made changes -
Assignee Priority | P2 |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23303 | Sun Dec 05 23:42:20 MST 2010 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/ProgressListenerResourcePusher.java
MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/PushUtils.java |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23439 | Fri Dec 10 01:21:35 MST 2010 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/rime/fileEntry.css
MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.fileentry/fileEntry.js MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/ProgressListenerResourcePusher.java MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryRenderer.java MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/utils/JSONBuilder.java MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/sam/fileEntry.css |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23461 | Fri Dec 10 14:16:30 MST 2010 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/rime/fileEntry.css
MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.fileentry/fileEntry.js ADD /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/sam/fileEntryIndet.gif MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/sam/fileEntry.css ADD /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/rime/fileEntryIndet.gif ADD /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/skins/rime/fileEntryProg.gif |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23465 | Fri Dec 10 14:46:19 MST 2010 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/ProgressListenerResourcePusher.java
MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/ProgressResource.java |
Ken Fyten
made changes -
Comment |
[ FYI: The following error is now reported in the server log (ace-showcase): Dec 8, 2010 6:12:23 PM com.sun.faces.context.SessionMap put WARNING: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession (key: org.icefaces.resource-org.icefaces.component.fileentry.progress.fileform::v8r1tw05.txt, value class: org.icefaces.application.ResourceRegistryHolder). ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Assignee Priority | P2 | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Older browsers, such as IE6, allow only two socket connections to the server. So, if one socket is currently being used to upload the file, then only one remains for other interactions. If server push is being used, then that would involve the second socket being used for a blocking connection, leaving none for obtaining progress information. As such, progress should be implemented via server push, instead of on it's own.
The basic building blocks of the solution are as follows:
1. Server side preparation before upload
On the server side, a resource for the progress information will be registered in either request or session scope. As well, a push id will be created. When the fileEntry component renders itself, it will send the URL of the resource and the push id to the browser.
2. Client side work immediately before submit / upload
The fileEntry javascript will register the push id with the bridge, giving a function callback, which will respond to progress push notifications.
3. Server side work during upload, for progress notification
When there is sufficient progress, and some amount of time has passed since the last progress notification, the resource contents will be updated with the new progress information, and a push notification will be given.
4. Client side work during upload, in progress notifications
When there is progress, the javascript progress function will use the XMLHttpRequest to access the resource. The resource may contain a JSON data structure with the progress information for all of the files, as well as the total progress, if possible. Potentially the success/failure messages will be included as well. The user interface will be updated with this data.
There will be a race condition, if the resource is in request scope, where the request will have finished, and the response will be transmitted to the browser, and in-between the browser may respond to push notifications, where the resource is no longer available. The client code should gracefully accept this, and do nothing.
5. Server side work after upload
When rendering the fileEntry component after the uploads have completed, it should render the same UI that the progresses rendered, but with everything completed. And the registered resource should be set to depict everything as completed as well.
6. Client side work after upload
When the component javascript gets the iframe updates after the upload, it should de-register itself from push notifications, so that the bridge may cease maintaining a blocking connection, if the fileEntry upload operation was the sole use of it.