Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2126

Autocompleter keyName do not get posted in a form

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.8
    • 2.1.0
    • Plugin - Tags
    • None
    • Tomcat 5.5, Firefox 2

    Description

      Having:

      <s:autocompleter name="stay.teacher.countryName" theme="simple"
      list="

      {'España','Portugal','Francia','Alemania','Holanda','Estados Unidos'}

      "
      dropdownHeight="200" value="%

      {stay.teacher.countryName}

      " />

      The HTML generated is:

      <select dojoType="struts:ComboBox"
      id="teacherUpdateForm_stay_teacher_countryName" dropdownHeight="200"
      name="stay.teacher.countryName" keyName="stay.teacher.countryNameKey"
      initialValue="Francia">
      <option value="España">España</option>
      <option value="Portugal">Portugal</option>
      <option value="Francia" selected="selected">Francia</option>
      <option value="Alemania">Alemania</option>
      <option value="Holanda">Holanda</option>
      <option value="Estados Unidos">Estados Unidos</option>
      </select>

      If I submit the form containing the autocompleter, the fields posted values are:

      stay.teacher.countryName: Francia
      stay.teacher.countryNameKey: (empty)

      However, if I select in the autocompleter the same item ('Francia' in my case):

      a) A Javascript error is fired:

      Permiso para obtener la propiedad HTMLDivElement.parentNode denegado
      [Break on this error] throw _13||Error(_12);

      (translation: permission denied to access HTMLDivElement.parentNode property)

      b) The following is posted:

      stay.teacher.countryName: Francia
      stay.teacher.countryNameKey: Francia

      Attachments

        Activity

          People

            musachy Musachy Barroso
            alvaro.sanchez Alvaro Sanchez-Mariscal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: