ICEfaces
  1. ICEfaces
  2. ICE-7748

Enhance the fileEntry callback tutorial to show custom failure types (was: fileEntry callback tutorial show custom failure)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.2
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ACE
    • Affects:
      Sample App./Tutorial

      Description

      The existing MD5 tutorial shows how do update the FileEntryStatus to reflect a success and a failure, but the failure won't actually ever happen. ICE-7712 was from us not testing the failure case either. So, let's augment the tutorial to allow for actually passing and actually failing.

      We should set a maximum file size, which would show pre-failing, and then do the MD5, and succeed after that, but then fail on some condition, like a file extension being JPEG pr something like that.

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 3.0.1 [ 10282 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.1 [ 10312 ]
        Fix Version/s 3.0.1 [ 10282 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.2 [ 10338 ]
        Fix Version/s 3.1 [ 10312 ]
        Affects [Sample App./Tutorial]
        Hide
        Mark Collette added a comment -

        When an uploaded file has failed built-in validation (maximum file size, etc.) then it will call validationFailed() and renderResponse() on the FacesContext. If the app then makes the upload be a success, and no FacesMessage explains how or why the form validation failed and why the bean state hasn't been updated, that could get quite confusing. So, pre-fail -> success is problematic. But, taking an initially successful upload, and having the app custom fail it, due to file extension or some other arbitrary measure of the file, is quite doable.

        Show
        Mark Collette added a comment - When an uploaded file has failed built-in validation (maximum file size, etc.) then it will call validationFailed() and renderResponse() on the FacesContext. If the app then makes the upload be a success, and no FacesMessage explains how or why the form validation failed and why the bean state hasn't been updated, that could get quite confusing. So, pre-fail -> success is problematic. But, taking an initially successful upload, and having the app custom fail it, due to file extension or some other arbitrary measure of the file, is quite doable.
        Ken Fyten made changes -
        Assignee Matthew Cowell [ cowemat ]
        Hide
        Matthew Cowell added a comment -

        For reference, the tutorial documentation is on the wiki here: http://wiki.icesoft.org/display/ICE/Incremental+Upload+Processing+Using+FileEntryCallback

        Show
        Matthew Cowell added a comment - For reference, the tutorial documentation is on the wiki here: http://wiki.icesoft.org/display/ICE/Incremental+Upload+Processing+Using+FileEntryCallback
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30583 Thu Aug 23 08:20:26 MDT 2012 matthew.cowell [ICE-7748] Added message for custom failure
        Implemented custom failure on upload of certain file types
        Files Changed
        Commit graph DEL /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial/src/main/resources/messages_en.properties
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial/src/main/webapp/WEB-INF/faces-config.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial/src/main/java/org/icefaces/tutorials/ace/faces/listeners/FileMD5EncodingCallback.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial/src/main/webapp/WEB-INF/templates/tutorial-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial
        Commit graph ADD /icefaces3/trunk/icefaces/tutorials/file-callback-tutorial/src/main/java/messages_en.properties
        Matthew Cowell made changes -
        Assignee Matthew Cowell [ cowemat ] Mark Collette [ mark.collette ]
        Matthew Cowell made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Migration made changes -
        Summary fileEntry callback tutorial show custom failure Enhance the fileEntry callback tutorial to show custom failure types (was: fileEntry callback tutorial show custom failure)
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mark Collette
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: