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

The OptionTransferSelect tag doesn't recognize the attribute doubleOnmouseup and doubleOnmouseover

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.1.2
    • 2.3.7
    • Plugin - Tags
    • None
    • Microsoft Windows 7 (32-bit)
      Eclipse Helios Service Release 2
      Java JDK 1.6.0_17

    Description

      When I use to set the attribute "doubleOnmouseover" to the optiontransferselect tag, the generated html code doesn't include the "onmouseover" attribute for the second (or right) select box.

      For example:

      <s:optiontransferselect
      id="language_left"
      name="language.blackList"
      list="language.blackList"
      listValue="productDetails[top].name" size="20"
      doubleId="language_right"
      doubleName="language.whiteList"
      doubleList="language.whiteList"
      doubleListValue="productDetails[top].name"
      doubleSize="20"
      formName="languageForm"
      allowSelectAll="false"
      allowUpDownOnLeft="false"
      allowUpDownOnRight="false"
      addToLeftLabel="%

      {getText('optiontransferselect.addToLeft')}

      "
      addAllToLeftLabel="%

      {getText('optiontransferselect.addAllToLeft')}

      "
      addToRightLabel="%

      {getText('optiontransferselect.addToRight')}

      "
      addAllToRightLabel="%

      {getText('optiontransferselect.addAllToRight')}

      "
      leftTitle="%

      {getText('optiontransferselect.products.all')}

      "
      rightTitle="%

      {getText('optiontransferselect.products.selected')}

      "
      onmouseover="showTooltip('language_left', event.target.value)"
      doubleOnmouseover="showTooltip('language_right', event.target.value)" />

      ...will be transformed into:

      <script src="/BackOffice/struts/optiontransferselect.js" type="text/javascript"></script>
      <table border="0">
      <tbody>
      <tr>
      <td>
      <select
      onmouseover="showTooltip('language_left', event.target.value)"
      multiple="multiple"
      id="language_left"
      size="20"
      name="language.blackList">
      <option selected="selected" value="1962">F-Kachel</option>
      <%-- further options have been removed due to readability --%>
      </select>
      <input type="hidden" value="" name="_multiselect_language.blackList" id="_multiselect_language_left">
      </td>
      <td valign="middle" align="center">
      <%-- buttons have been removed due to readability --%>
      </td>
      <td>
      <select
      id="language_right"
      multiple="multiple"
      size="20"
      name="language.whiteList">
      <option selected="selected" value="1590">kms100</option>
      <%-- further options have been removed due to readability --%>
      </select>
      <input type="hidden" value="" name="_multiselect_language.whiteList" id="_multiselect_language_right">
      </td>
      </tr>
      </tbody>
      </table>

      As you can see, the second select tag is missing the "onmouseover" attribute, while the first select tag correctly contains it's "onmouseover" attribute.

      I could also find out, why this is happening: the freemarker template optiontransferselect.ftl contains 2 errors. The first is the one, that is described above, which is related to the fact that the following lines of codes are missing:

      <#if parameters.doubleOnmouseover??><#t/>
      onmouseover="${parameters.doubleOnmouseover?html}"
      </#if><#t/>

      The second error that I've found is that at line 217 the parameter is misspelled:

      217: onmouseup="${parameters.doubleMnmouseup?html}"

      ...should be...

      217: onmouseup="${parameters.doubleOnmouseup?html}"

      After I changed these lines, the OptionTransferSelect tag worked properly.

      I hope, that I could help you with this bug report.
      Kind regards, Daniel

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jogep Johannes Geppert
            danielmueller Daniel Müller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment