1 Reply Latest reply on Mar 7, 2008 12:24 AM by nathan dennis

    How to reRender ContextMenu before show?

    Mike Finkenzeller Newbie

      I am trying to reRender the ContextMenu before showing it but can not figure out when do this. I tried <a4j:support event="onexpand" reRender="menu"/> but this seems to late to capture the event.
      I tried a bunch of other combinations but with no success. Any ideas?

      I am running:
      Seam 2.0.1.GA, RichFaces 3.2.0-SNAPSHOT, Facelets 1.1.13...

      <rich:contextMenu attached="false"
      id="headerMenu" submitMode="ajax">
      <a4j:support event="onexpand" reRender="formatMenu"/>
      <rich:menuGroup id="formatMenu" value="Data format...">
      <c:forEach id="dataRepeater"
      items="#{tableEditor.columnMenu}" var="menuItem">
      <rich:menuItem value="#{menuItem}" ajaxSingle="true">
      <a4j:actionparam name="columnIndex"
      <a4j:actionparam name="selectedFormat"

      <rich:componentControl event="oncontextmenu" attachTo="column_#{headCs.index}"
      <f:param value="#{column.header}" name="columnLabel"/>
      <f:param value="#{headCs.index}" name="columnIndex"/>

        • 1. Re: How to reRender ContextMenu before show?
          nathan dennis Expert

          i ran into this a couple weeks ago... im not going to say my solution is the correct one... but my wit-less hack wrapped the contextMenu in an outputPanel.
          When ever an event was captured that would change the panels content.. i refreshed the panel.. down side is... depending on your app design and how often the data changes... could be needless rerenders... in my case it wasnt... so i got away with it.

          maybe one of the gurus have a better suggestion.