ICEfaces
  1. ICEfaces
  2. ICE-7778

ace:fileEntry component affect input components when special characters are used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.GA, 2.0.2, 3.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3.0, ICEfaces 2.0.0.GA Chrome 17, FF10, IE9. JSF Mojarra 2.1.2 - 2.1.7. Tomcat 7

      Description

      Special signs like the german umlauts (ä, ö, ü) or the Euro sign (€) become unreadable when the text area or input filed are used with the ace:fileEntry component. As soon as you hit the upload button, the special signs in the input components are replaced with unreadable signs (FF and IE). In Chrome unreadable signs appear in the text area only after submit. After page refresh however they appear in both components.
      Removal of the <ace:fileEntry /> component from the page will fix this issue.

      Screen shots and source files are attached to reproduce this behavior.
      1. FormBean.java
        2 kB
        Evgheni Sadovoi
      2. welcomeICEfaces.xhtml
        1 kB
        Evgheni Sadovoi
      1. afterPageRefreshChrome.jpg
        14 kB
      2. afterSubmitChrome.jpg
        14 kB
      3. afterSubmit_FF_and_IE.jpg
        13 kB
      4. beforeSubmit.jpg
        15 kB

        Issue Links

          Activity

          Hide
          Bernhard Schenk added a comment -

          The issue still exists. See ICE-6570 .
          There is a patch attached.

          Show
          Bernhard Schenk added a comment - The issue still exists. See ICE-6570 . There is a patch attached.
          Hide
          Mark Collette added a comment -

          Using some of the test code from this jira, I was able to reproduce the issue. And using code based from the patch from ICE-6570, the issue was resolved.

          One lingering side note is that the dom differencing still detects a change for the inputTextarea rendering, since the old dom contains the regular string, and the new dom contains and escaped sequence. This might indicate that our dom save/restore deserialization code unescapes characters.

          <textarea id="example-form:Comments">[0]<#text> :: Value changed from 'HELLO ????? THERE' to 'HELLO £¢?üå THERE'

          At least the text is no longer being corrupted.

          icefaces 3 trunk
          Subversion 28105

          icefaces-3.0.x-maintenance
          Subversion 28106

          Show
          Mark Collette added a comment - Using some of the test code from this jira, I was able to reproduce the issue. And using code based from the patch from ICE-6570 , the issue was resolved. One lingering side note is that the dom differencing still detects a change for the inputTextarea rendering, since the old dom contains the regular string, and the new dom contains and escaped sequence. This might indicate that our dom save/restore deserialization code unescapes characters. <textarea id="example-form:Comments"> [0] <#text> :: Value changed from 'HELLO ????? THERE' to 'HELLO £¢?üå THERE' At least the text is no longer being corrupted. icefaces 3 trunk Subversion 28105 icefaces-3.0.x-maintenance Subversion 28106
          Hide
          Mark Collette added a comment -

          To reproduce / debug the issue, I made the following code changes to the showcase ace:fileEntry example.

          Added this to: icefaces3/samples/showcase/showcase/src/main/webapp/resources/examples/ace/fileentry/fileentry.xhtml
          <h:panelGrid columns="2">
          <ice:outputText value="Name :"/>
          <ice:panelGroup>
          <ice:inputText id="Name" value="#

          {fileEntry.testName}

          "/>
          <ice:message for="Name"/>
          </ice:panelGroup>
          <ice:outputText value="Comments :"/>
          <ice:panelGroup>
          <ice:inputTextarea id="Comments" value="#

          {fileEntry.testComments}

          " cols="40" rows="3" />
          <ice:message for="Comments"/>
          </ice:panelGroup>
          </h:panelGrid>

          And made it so it no longer had required="true" on the fileEntry in that form, so I wouldn't have to actually upload a file to test this.

          And this to: icefaces3/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/file/FileEntryBean.java

          private String testName = "HELLO £¢≠üå", testComments = "HELLO £¢≠üå";
          public String getTestName()

          { System.out.println("getTestName: " + testName); return testName; }

          public void setTestName(String tn)

          { testName = tn; System.out.println("setTestName: " + testName);}

          public String getTestComments()

          { System.out.println("getTestComments: " + testComments); return testComments; }

          public void setTestComments(String tc)

          { testComments = tc; System.out.println("setTestComments: " + testComments); }
          Show
          Mark Collette added a comment - To reproduce / debug the issue, I made the following code changes to the showcase ace:fileEntry example. Added this to: icefaces3/samples/showcase/showcase/src/main/webapp/resources/examples/ace/fileentry/fileentry.xhtml <h:panelGrid columns="2"> <ice:outputText value="Name :"/> <ice:panelGroup> <ice:inputText id="Name" value="# {fileEntry.testName} "/> <ice:message for="Name"/> </ice:panelGroup> <ice:outputText value="Comments :"/> <ice:panelGroup> <ice:inputTextarea id="Comments" value="# {fileEntry.testComments} " cols="40" rows="3" /> <ice:message for="Comments"/> </ice:panelGroup> </h:panelGrid> And made it so it no longer had required="true" on the fileEntry in that form, so I wouldn't have to actually upload a file to test this. And this to: icefaces3/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/file/FileEntryBean.java private String testName = "HELLO £¢≠üå", testComments = "HELLO £¢≠üå"; public String getTestName() { System.out.println("getTestName: " + testName); return testName; } public void setTestName(String tn) { testName = tn; System.out.println("setTestName: " + testName);} public String getTestComments() { System.out.println("getTestComments: " + testComments); return testComments; } public void setTestComments(String tc) { testComments = tc; System.out.println("setTestComments: " + testComments); }

            People

            • Assignee:
              Mark Collette
              Reporter:
              Evgheni Sadovoi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: