Details
Description
Since introducing attribute "onclick" to menuItem (see issue ICE-2745), when using menuItem as a simple link instead of action/actionListener, the generated defaultvalue of onclick renders to "return false;". This leads to the situation, that nothing happens, when clicking on such a menuitem. See source MenuItemRenderer.java, function makeTopLevelAnchor line 286:
anchor.setAttribute(HTML.ONCLICK_ATTR, "return false;");
That function is called in line 672 for non-action-menuItems on toplevel.
Also note that non-toplevel-menuItems with link do not seem to have that problem (see function makeAnchor) because the onlcik-attribute is not set to a defaultvalue.
anchor.setAttribute(HTML.ONCLICK_ATTR, "return false;");
That function is called in line 672 for non-action-menuItems on toplevel.
Also note that non-toplevel-menuItems with link do not seem to have that problem (see function makeAnchor) because the onlcik-attribute is not set to a defaultvalue.
Activity
Wolfgang Schröder
created issue -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17797 | Tue Oct 21 10:26:16 MDT 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/menubar/MenuItemRenderer.java
MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/menubar/MenuItem.java |
Mark Collette
made changes -
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Resolution | Fixed [ 1 ] | |
Assignee | Mark Collette [ mark.collette ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Mark Collette [ mark.collette ] |
Now it will only render "return false;" for the onclick attribute if the link attribute and the onclick attribute are not set.
TRUNK
Subversion 17797
icefaces\component\src\com\icesoft\faces\component\menubar\MenuItem.java
icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java