2 Replies Latest reply on Jan 12, 2008 2:11 AM by knowbuddy wayne

    problem with appearance and functions of menu items of conte

    knowbuddy wayne Newbie

      i just copied the code from the demo page (about context menu) trying to reproduce the effect:

       <h:panelGrid columns="1" columnClasses="cent">
       <h:outputText value="Perform right-click on the picture to call the menu" style="font-weight:bold" id="label"/>
       <h:panelGroup id="picture">
       <h:graphicImage value="face.gif" id="pic"/>
       <rich:contextMenu id="godmenu" itemStyle="contextMenuItemStyle" event="oncontextmenu" attached="true" submitMode="none">
       <rich:menuItem value="Zoom In" onclick="enlarge();" id="zin"></rich:menuItem>
       <rich:menuItem value="Zoom Out" onclick="decrease();" id="zout"></rich:menuItem>
       <script type="text/javascript">
       function enlarge(){
       function decrease(){
      document.getElementById('pic').width=document.getElementById('pic').width*0.9; document.getElementById('pic').height=document.getElementById('pic').height*0.9;

      the menu items' appearance doesn't look right -- when i move mouse over the item the background doesn't change, the cursor changed to a text selector('I', instead of a hand like in the dropdown menu) -- it doesn't look like the item is 'selected', but surprisingly, the js code is working after clicking the mouse button. what's most disturbing is that the menu doesn't go away after the function is triggered, and if i use rich:menuGroup, the submenu is not popped.
      any idea? thanks in advance.
      I am using richfaces 3.1.3 GA in JBoss Seam, i tried firefox2.0 and ie 6.0.