ICEfaces
  1. ICEfaces
  2. ICE-6570

Problem with internationalization when using FileEntry component

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Windows 7, NetBeans 6.9.1, Apache Tomcat 6.0.26, JSF 2.0, IceFaces 2.0

      Description

      I am no really sure if this is a bug, but I have encoutered a problem with my registration page when I tried to add FileEntry component there. When I send the data through h:commandButton to the bean it converts Strings into bad format (for example "Někdo" into "NÄ›kdo"). Everything is working ok without fileEntry. I also enclose some source codes. So now I have separeted it into two pages - one for data and second one for files, but I would rather have it on a single page.
      This is my fileEntry component on a page
      #{registerPage.photo}: <ace:fileEntry absolutePath="C:/uploaded/" maxFileCount="1"
                                                label="File Upload"
                                                fileEntryListener="#{registration.fileListener}"
                                                useOriginalFilename="true"
                                                immediate="true"
                                                id="photo"/>]
      and this the file listener in bean
       public void fileListener(FileEntryEvent event) {
              FileEntry fileEntry = (FileEntry) event.getSource();
              String id = fileEntry.getId();
              FileEntryResults results = fileEntry.getResults();
              for (FileEntryResults.FileInfo fileInfo : results.getFiles()) {
                  if (fileInfo.isSaved()) {
                        setPhoto(fileInfo.getFile().getPath());
                  }
      }
      The listener, getters and setters for data and action method is all in the same bean (registration)
      1. ICE-6570.patch
        1.0 kB
        Bernhard Schenk

        Issue Links

          Activity

          Hide
          Bernhard Schenk added a comment -

          We have the same issue. The character-encoding is ignored in case of multipart-stream. I fixed this in the FileEntryPhaseListener.
          The patch (/tags/icefaces-2.0.2) is attached.

          Show
          Bernhard Schenk added a comment - We have the same issue. The character-encoding is ignored in case of multipart-stream. I fixed this in the FileEntryPhaseListener. The patch (/tags/icefaces-2.0.2) is attached.
          Hide
          Mark Collette added a comment -

          Committed under ICE-7778.

          Show
          Mark Collette added a comment - Committed under ICE-7778 .

            People

            • Assignee:
              Mark Collette
              Reporter:
              Petr Men?ík
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: