Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-7625

fileUpload does not execute validator

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Seam 2.1.2

      Description

      Neither required="true" or validator="function" in rich:fileupload does produce messages (are not valiadated).

      Example:

      [xhtml]
      ...
      <s:validateAll>
      ....
      <rich:fileUpload
      id="uploads"
      fileUploadListener="#

      {my.listener}

      "
      maxFilesQuantity="10"
      immediateUpload="true"
      allowFlash="false"
      required="true"
      validator="#

      {my.validateUploads}

      "
      noDuplicate="true">
      <a4j:support event="onuploadcomplete" />
      <f:facet name="label">
      <h:outputText
      value="{_KB}KB from

      {KB}

      KB uploaded —

      {mm}

      :

      {ss}

      " />
      </f:facet>
      </rich:fileUpload>
      <rich:message for="uploads" />
      ...
      </s:validateAll>
      ...

      [Bean code]
      ...
      public void validateUploads(FacesContext facesContext, UIComponent uiComponent, Object value)
      throws ValidatorException

      { throw new ValidatorException(new FacesMessage("This is The searched ERROR!")); }

      Does not produce an error message.
      Running in Debug shows that the validator function is never called.
      It is therefore impossible to check if there are any files uploaded.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  nbelaevski Nick Belaevski
                  Reporter:
                  bon_scott Benedikt Thelen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: