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

jQuery plugin menu tag renders an unexpected toString() after upgrading to 2.3.15

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.15, 2.3.15.1
    • Fix Version/s: 2.3.16
    • Component/s: Core Actions
    • Labels:
      None
    • Environment:

      Struts2 jQuery Showcase

      Description

      After testing Struts2 jQuery Plugin with 2.3.15 the menu tag renders an additional unexpected menu item.

      <a href="javascript:void(0)">
      java.lang.Object@241e681f
      </a>

      1. ww-4142.zip
        7 kB
        Johannes Geppert
      2. struts2-jquery-menu-tag-problem.PNG
        34 kB
        Johannes Geppert

        Activity

        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Maybe it is related to WW-3551 and WW-4135 ?

        Show
        lukaszlenart Lukasz Lenart added a comment - Maybe it is related to WW-3551 and WW-4135 ?
        Hide
        jogep Johannes Geppert added a comment -

        Hi Lukasz,

        you are right, this looks familiar with the referenced Issues.
        But until now I don't understand why this messages appears after upgrading to 2.3.15.
        Because the <@s.property value="parameters.body"/> is not used by the jquery menu template.

        https://code.google.com/p/struts2-jquery/source/browse/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/menu-close.ftl

        This Bug also appears in the accordion tag.

        Thanks

        Johannes

        Show
        jogep Johannes Geppert added a comment - Hi Lukasz, you are right, this looks familiar with the referenced Issues. But until now I don't understand why this messages appears after upgrading to 2.3.15. Because the <@s.property value="parameters.body"/> is not used by the jquery menu template. https://code.google.com/p/struts2-jquery/source/browse/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/menu-close.ftl This Bug also appears in the accordion tag. Thanks Johannes
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Could you prepare a small demo app? Then I will be able to debug and look into it.

        Show
        lukaszlenart Lukasz Lenart added a comment - Could you prepare a small demo app? Then I will be able to debug and look into it.
        Hide
        jogep Johannes Geppert added a comment -

        Maven Archive that demonstrate the Bug with Struts 2.3.15.1.

        Change Struts Version to 2.3.14 the Bug does not exists.

        Show
        jogep Johannes Geppert added a comment - Maven Archive that demonstrate the Bug with Struts 2.3.15.1. Change Struts Version to 2.3.14 the Bug does not exists.
        Hide
        jogep Johannes Geppert added a comment -

        Hi Lukasz,

        I found a solution how to fix this in the Struts2 jQuery Plugin Templates.
        Both templates menu-close.ftl and accordion-close.ftl including a section to generate
        the items via the iterator tag.

         
        <@s.iterator value="parameters.list" status="rowstatus">
        </@s.iterator>
        

        When I surround this tag with a list exists check the additional entries are gone away.

         
        <#if parameters.list?? >
        <@s.iterator value="parameters.list" status="rowstatus">
        </@s.iterator>
        </#if>
        

        So the question is why the iterator tag iterates even when the list does not exists since version 2.3.15?

        Johannes

        Show
        jogep Johannes Geppert added a comment - Hi Lukasz, I found a solution how to fix this in the Struts2 jQuery Plugin Templates. Both templates menu-close.ftl and accordion-close.ftl including a section to generate the items via the iterator tag. <@s.iterator value= "parameters.list" status= "rowstatus" > </@s.iterator> When I surround this tag with a list exists check the additional entries are gone away. <# if parameters.list?? > <@s.iterator value= "parameters.list" status= "rowstatus" > </@s.iterator> </# if > So the question is why the iterator tag iterates even when the list does not exists since version 2.3.15? Johannes
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        The only I see is this WW-3942

        Show
        lukaszlenart Lukasz Lenart added a comment - The only I see is this WW-3942
        Hide
        jogep Johannes Geppert added a comment -

        I see this one too. But this Fix was already included since 2.3.8.

        Show
        jogep Johannes Geppert added a comment - I see this one too. But this Fix was already included since 2.3.8.
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        It is related to WW-3623

        Show
        lukaszlenart Lukasz Lenart added a comment - It is related to WW-3623
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1509233 from Lukasz Lenart in branch 'struts2/trunk'
        [ https://svn.apache.org/r1509233 ]

        Partially reverts: WW-3623 some generics fix - to solve WW-4142

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1509233 from Lukasz Lenart in branch 'struts2/trunk' [ https://svn.apache.org/r1509233 ] Partially reverts: WW-3623 some generics fix - to solve WW-4142
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Problem was/is related to using generics in Component class - parameters field cannot be defined with generics as for now :\

        Show
        lukaszlenart Lukasz Lenart added a comment - Problem was/is related to using generics in Component class - parameters field cannot be defined with generics as for now :\
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Struts2-JDK6 #773 (See https://builds.apache.org/job/Struts2-JDK6/773/)
        Partially reverts: WW-3623 some generics fix - to solve WW-4142 (lukaszlenart: rev 1509233)

        • /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Struts2-JDK6 #773 (See https://builds.apache.org/job/Struts2-JDK6/773/ ) Partially reverts: WW-3623 some generics fix - to solve WW-4142 (lukaszlenart: rev 1509233) /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            jogep Johannes Geppert
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development