2 Replies Latest reply on Oct 16, 2008 5:08 PM by Patrick Madden

    Context Menu and output link

    Patrick Madden Newbie

      Hi, I've recently upgraded to 3.2.2.GA and now context menu's containing output links don't seem to work when they did before. I got the following errror:


      Caused by: javax.faces.FacesException: Context menu cannot be attached to the component with id = j_id250, because a client identifier of the component won't be rendered onto the page. Please, set the identifier.


      I started searching and saw that I should use the component control way of showing the menu. I changed my xhtml to the following:


      <rich:contextMenu id="mozillaDocumentMenu" attached="false" submitMode="none">
       <rich:menuItem submitMode="node" id="editDocumentID">
       <h:outputLink value="#{editUrl}" title="#{editUrl} target="_blank" style="font-weight:bold">
       <h:outputText value="Open File #{title}" />
       </h:outputLink>
       </rich:menuItem>
       <rich:menuItem submitMode="none" id="openContainingFolderID">
       <h:outputLink value="#{folderUrl}" target="_blank">
       <h:outputText value="Open Containing Folder"/>
       </h:outputLink>
       </rich:menuItem>
       <rich:menuItem submitMode="none" id="printDocumentID">
       <h:outputLink value="#{printUrl}" target="_blank">
       <h:outputText value="Print"/>
       </h:outputLink>
       </rich:menuItem>
      </rich:contextMenu>
      


      and here is a snippet where I define my menu:


      <h:outputLink id="documentLinkID" style="font-weight:bold" title="#{result.uncPathForMozilla}" value="#">
       <rich:componentControl event="onclick" attachTo="documentLinkID" for="mozillaDocumentMenu" operation="show">
       <f:param name="title" value="#{result.title}"/>
       <f:param name="editUrl" value="#{cloosterRequestBean.jarHttpProtocolURL}securescripts/mozillaEditFile.html?uncPath=#{result.uncPathForMozilla}" />
       <f:param name="folderUrl" value="#{cloosterRequestBean.jarHttpProtocolURL}securescripts/mozillaEditFile.html?uncPath=#{result.uncLocationForMozilla}" />
       <f:param name="printUrl" value="#{cloosterRequestBean.jarHttpProtocolURL}securescripts/mozillaPrintFile.html?uncPath=#{result.uncPathForMozilla}" />
       </rich:componentControl>
       <h:outputText value="#{result.title}" />
      </h:outputLink>


      The menu is shown correctly however nothing happens when I click any of the three menu's. I know the URL's are correct. They look a bit strange but they are calling into a Mozilla FireFox Addon using the Jar Protocol as my scripts have to be signed.

      Regardless, is this related to:
      https://jira.jboss.org/jira/browse/RF-2102

      Any help is greatly appreciated.

      Thanks,

      PVM