HtmlMenuItem API output problem
dr3342 Apr 24, 2008 12:26 PMI have a custom drop down menu creating class that calls the org.richfaces.component.html.HtmlMenuItem class.
... HtmlMenuItem navItem = new HtmlMenuItem(); ...
When it gets down to rendering on the browser it ends up generating code that has some control/special character in it that causes it to bomb.
... <div class="dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled" id="j_id7:j_id112" onclick="this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled'; ;" onmouseout="if (RichFaces.Menu.isWithin(event, this)) return; this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled'; $('j_id7:j_id112').style.cssText=';'; $('j_id7:j_id112:icon').className='dr-menu-icon rich-menu-item-icon '; Element.removeClassName($('j_id7:j_id112:anchor'), 'rich-menu-item-label-selected');" onmouseover="if (RichFaces.Menu.isWithin(event, this)) return; this.className='dr-menu-item dr-menu-item-hover rich-menu-item rich-menu-item-hover';; $('j_id7:j_id112').style.cssText='; ; ;'; $('j_id7:j_id112:icon').className='dr-menu-icon dr-menu-icon-selected rich-menu-item-icon rich-menu-item-icon-selected '; Element.addClassName($('j_id7:j_id112:anchor'), 'rich-menu-item-label-selected');" onmouseup="Event.�top(event); " style="; "> <span class="dr-menu-icon rich-menu-item-icon " id="j_id7:j_id112:icon"> <img height="16" src="/ECSC/a4j_3_2_1-SNAPSHOTimages/spacer.gif" width="16" /> </span> <span class="rich-menu-item-label " id="j_id7:j_id112:anchor"> <a href="https://server.company.com/ECSC/Index.seam">Documents</a> </span> </div> ...
The character always appears in the onmouseup script. It probably should be:
onmouseup="Event.stop(event);"
but the "s" in stop is always a control character.
Am I doing something that could possibly cause this, or is this a bug?
I am using:
JBoss 4.2.2 GA
Seam 2.1.0 Snapshot
RichFaces 3.2.1 Snapshot (also have tried 3.2.0 SR 1)
Facelets 1.1.14
JSF Sun RI 1.2_08
Thanks,
David