Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major 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

      The FileEntry required property is supported throught the FileEntry infrastructure, with the statuses etc., but is not actually enforced when required="true". Exactly what enforcement would require is not fully know. Perhaps calling FacesContext.validationFailed() would suffice. Additionally, FacesContext.renderResponse() might be necessary.

        Activity

        Hide
        Mark Collette added a comment -

        Now the required property will be respected. Iif a non-single-submit and non-partial-submit form submit occurs, which executes the fileEntry component, and no file has been uploaded, it will check it's required property, and fail the form submission, and add a FacesMessage. The FacesMessage will first try to use the message format specified by the requiredMessage property, and if none is given, will use the message format from the application resource bundle, and if none is given, will use the message format from the ACE resource bundle. The message format has one parameter

        {0}

        in which the fileEntry component's label or clientId will go.

        Adding the basic functionality of required was straight forward, given ICE-6203 provided a default validation mechanism. The only challenge was in making the FileEntryStatuses.REQUIRED code for creating a FacesMessage, since it is a unique case, as it does not describe a FileInfo like most of the other cases.

        Test ui provided, in form17 of: icefaces2/ace/test/web/fileEntry.xhtml

        Component changes
        Subversion 23611

        Test app changes
        Subversion 23612

        Show
        Mark Collette added a comment - Now the required property will be respected. Iif a non-single-submit and non-partial-submit form submit occurs, which executes the fileEntry component, and no file has been uploaded, it will check it's required property, and fail the form submission, and add a FacesMessage. The FacesMessage will first try to use the message format specified by the requiredMessage property, and if none is given, will use the message format from the application resource bundle, and if none is given, will use the message format from the ACE resource bundle. The message format has one parameter {0} in which the fileEntry component's label or clientId will go. Adding the basic functionality of required was straight forward, given ICE-6203 provided a default validation mechanism. The only challenge was in making the FileEntryStatuses.REQUIRED code for creating a FacesMessage, since it is a unique case, as it does not describe a FileInfo like most of the other cases. Test ui provided, in form17 of: icefaces2/ace/test/web/fileEntry.xhtml Component changes Subversion 23611 Test app changes Subversion 23612

          People

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

            Dates

            • Created:
              Updated:
              Resolved: