gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

onclick and href called twice #955

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have code as follows:

<sj:menu id="rootMenu" 
         cssClass="rootMenu">
    <s:iterator value="%{items}" >        
        <sj:menuItem title="%{title}"
                     href="#"
                     onclick="updateContentFromNavi(%{contentId});"
                     cssClass="rootMenuItem">
            <sj:menu cssClass="subMenu">
                <s:iterator value="%{subItems}">
                     <sj:menuItem title="%{title}"
                                  href="#"
                                  onclick="updateContentFromNavi(%{contentId});"/>

                </s:iterator>
            </sj:menu>
        </sj:menuItem>        
    </s:iterator>
</sj:menu>

2. When I click on sub menu item, then onclick method from sub menu item and 
from overlaying menu item is called.

What is the expected output? What do you see instead?
I would expect that only onclick method from sub menu item is called.

Which struts2 version?
2.3.8

Which struts2-jquery plugin version?
3.5.1

Original issue reported on code.google.com by pascal.gehring@gmail.com on 27 Feb 2013 at 10:30

GoogleCodeExporter commented 9 years ago
It does not happens in the Showcase app. Can you please provide a small sample 
to reproduce it? Also please check if you have no duplicated IDs in your code.

Original comment by johgep on 7 Apr 2013 at 11:18