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

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Assignee Priority P2
        Ken Fyten made changes -
        Fix Version/s 1.7Beta1 [ 10121 ]
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Fix Version/s 1.7Beta1 [ 10121 ]
        Ken Fyten made changes -
        Assignee Priority P2 P3
        Ken Fyten made changes -
        Assignee Priority P3 P1
        Ken Fyten made changes -
        Comment [ Ignore the last comment, it was for ICE-2630. ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7RC1 [ 10123 ]
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Mark Collette [ mark.collette ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: