ICEfaces
  1. ICEfaces
  2. ICE-8949

Icefaces3 sample regression - showcase ace:autoCompleteEntry - using ' (apostrophe) char causes JS syntax error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2, EE-3.2.0.BETA
    • Fix Version/s: EE-3.2.0.GA, 3.3
    • Component/s: ACE-Components, Sample Apps
    • Labels:
      None
    • Environment:
      Icefaces3 trunk revision#33280
      Server: tomcat6
      Browser: FF3.6, IE7 & GoogleChrome24
      Last Known Working Revision: Unknown
    • Assignee Priority:
      P1

      Description

      AutoComplete - All - (All browsers) - when using the ' (apostrophe) character on autocomplete, JS syntax error below occurs:

      Error: SyntaxError: missing ) after argument list
      Source File: http://localhost:8080/showcase/showcase.jsf?grp=aceMenu&exp=autoCompleteEntryBean
      Line: 0, Column: 60
      Source Code:
      completers["inputForm:autoComplete"];instance.updateField(''S-Hertogenbosch', true);})();


      To Reproduce:
      -Build and deploy showcase app on Tomcat7
      -Navigate to showcase page and go to any AutoComplete feature page
      -input ' (apostrophe) char to render autocompleteEntry (Note: In FF18, Chrome24 or IE9, must have error console visible in order to see this error)
      -Notice the JS syntax error occur within the error console

      Note: Moj 2.1.18 Library was used when this issue was detected

        Activity

        Hide
        Arturo Zambrano added a comment - - edited

        Committed fix to 3.2 EE tag at revision 33301 and to trunk at revision 33302.

        Single quotes are now escaped in the updateField() call, which dynamically updates the text value of the input field.

        ice:selectInput text didn't need to be modified because it doesn't use this mechanism to update the input field.

        Show
        Arturo Zambrano added a comment - - edited Committed fix to 3.2 EE tag at revision 33301 and to trunk at revision 33302. Single quotes are now escaped in the updateField() call, which dynamically updates the text value of the input field. ice:selectInput text didn't need to be modified because it doesn't use this mechanism to update the input field.
        Hide
        Jerome Ruzol added a comment -

        Confirmed fixed as of trunk rev# 33302; no more JS syntax error occurence when using ' (apostrophe) character for autoCompleteEntry

        Show
        Jerome Ruzol added a comment - Confirmed fixed as of trunk rev# 33302; no more JS syntax error occurence when using ' (apostrophe) character for autoCompleteEntry
        Hide
        Cruz Miraback added a comment -

        Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on Tomcat6 in Firefox18, Chrome24, IE9.

        Show
        Cruz Miraback added a comment - Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on Tomcat6 in Firefox18, Chrome24, IE9.
        Hide
        Carmen Cristurean added a comment -

        Tested also with Build13 on Weblogic12 and Tomcat7, in FF18:
        JS error does not occur anymore, but two autocomplete pages are not functional if typing the "'":
        Custom Facet and Lazy Loading.

        Show
        Carmen Cristurean added a comment - Tested also with Build13 on Weblogic12 and Tomcat7, in FF18: JS error does not occur anymore, but two autocomplete pages are not functional if typing the "'": Custom Facet and Lazy Loading.
        Hide
        Arturo Zambrano added a comment -

        There's actually no problem with those demos. The component is still functional and returns results if you type other characters. What happens is that the autocomplete demos use two different lists of cities: /resources/selectinputtext/City-Names.txt and /resources/autocompleteentry/World_Cities_Location_table.txt. The Custom Facet and Lazy Loading demos use the latter, and that list only has one city that contains a single quote character.

        If you change the filterMatchMode attribute of the Custom Facet demo to "contains", you'll see a result, which is different from the other demos.

        Show
        Arturo Zambrano added a comment - There's actually no problem with those demos. The component is still functional and returns results if you type other characters. What happens is that the autocomplete demos use two different lists of cities: /resources/selectinputtext/City-Names.txt and /resources/autocompleteentry/World_Cities_Location_table.txt. The Custom Facet and Lazy Loading demos use the latter, and that list only has one city that contains a single quote character. If you change the filterMatchMode attribute of the Custom Facet demo to "contains", you'll see a result, which is different from the other demos.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Jerome Ruzol
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: