ICEfaces
  1. ICEfaces
  2. ICE-9118

ace:fileEntry missig attributes

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      icefaces 3.3 from trunk

      Description

      There is a small problem with Icefaces 1.8 to 3.3 migration.
      Attributes failOnEmptyFile and onChange are unsupported so people can't block submit button if file is not selected.
      Also fileEntryListener is not called if file is not selected so any kind of message can't be displayed.

        Activity

        Hide
        Krashan Brahmanjara added a comment - - edited

        Another one problem.Similar to ICE-8224.
        Put additional ice:commandButton to ace:fileEntry/Validation page.
        If you 'select file' then 'send a file' and click on ice:commanButton then you see message "You must select a file to upload" .. why, file is selected and uploaded already?
        The reason is in FileEntryPhaseListener.afterPhase this remove last results with FileEntry.removeResults method but this is not necessary I suppose.
        Workaround is add to form partialSubmit="true" but in this case users must prepare additional validation code because entryListener also is not called.

        Show
        Krashan Brahmanjara added a comment - - edited Another one problem.Similar to ICE-8224 . Put additional ice:commandButton to ace:fileEntry/Validation page. If you 'select file' then 'send a file' and click on ice:commanButton then you see message "You must select a file to upload" .. why, file is selected and uploaded already? The reason is in FileEntryPhaseListener.afterPhase this remove last results with FileEntry.removeResults method but this is not necessary I suppose. Workaround is add to form partialSubmit="true" but in this case users must prepare additional validation code because entryListener also is not called.
        Hide
        Mark Collette added a comment -

        Yes, failOnEmptyFile is not currently supported, but you could use custom validation to enable this yourself within your fileEntryListener. And if you wish to show a message when no file has been uploaded, you can set required=true and set requiredMessage to whatever you would like. Currently only h:commandButton is supported, not ice:commandButton, for submitting the form to upload the files. Onchange is not currently supported yet, as that's waiting for other features whose implementations will rely on the onchange attribute.

        Show
        Mark Collette added a comment - Yes, failOnEmptyFile is not currently supported, but you could use custom validation to enable this yourself within your fileEntryListener. And if you wish to show a message when no file has been uploaded, you can set required=true and set requiredMessage to whatever you would like. Currently only h:commandButton is supported, not ice:commandButton, for submitting the form to upload the files. Onchange is not currently supported yet, as that's waiting for other features whose implementations will rely on the onchange attribute.
        Hide
        Krashan Brahmanjara added a comment -

        True. File submit with h:commandButton works but some forms written in icefaces 1.8 are more complex.
        At this moment users can upload file with h:commanButton but can't easy accept this form with ice;commandButton later. Fix with "FileEntry.removeResults" in Ace core isn't possible?

        Show
        Krashan Brahmanjara added a comment - True. File submit with h:commandButton works but some forms written in icefaces 1.8 are more complex. At this moment users can upload file with h:commanButton but can't easy accept this form with ice;commandButton later. Fix with "FileEntry.removeResults" in Ace core isn't possible?

          People

          • Assignee:
            Unassigned
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: