ICEfaces
  1. ICEfaces
  2. ICE-2629

inputFile is reseting com.icesoft.faces.component.inputfile.InputFile properties

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#3
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      normal JSF deployment
    • Workaround Exists:
      Yes
    • Workaround Description:
      Manualy copy InputFile properties into a new object.

      Description

      I was just reviewing the component showcase inputFile example and finally took the time to look into an issue that has been bugging me fore some time.

      When using inputFile component a user binds an method to it to which is called when the file is successfully uploaded. The user then can get the InputFile object that was uploaded.

      public void uploadFile(ActionEvent event) {
              InputFile inputFile = (InputFile) event.getSource();
      .....
      }

      The problem I have is that InputFile is reset right after the my uploadFile method is called leaving me with a useless object. The only work around is to copy the needed properties in to a new object or say good bye.

      Here's what I think would be acceptable solutions:
       - have Input file implement a deep clone method
      - better yet have the component create a new instance of InputFile so that I can decide on how they should be reset/disposed.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: