title: disable dynamic context menu using javascript in jsf
body: <p>Is it possible to disable a dynamic context menu in JSF2.1 using java script ?</p>
  
  <pre><code>document.getElementById("myForm:contextMenuId:contextMenuItemId").style.display = 'none';
  </code></pre>
  
  <p>This works for a p:menuItem written as below.</p>
  
  <pre><code> &lt;p:contextMenu id="contextMenuId"&gt;                 
     &lt;p:menuitem id="contextMenuItemId" value="Hi"&gt;&lt;/p:menuitem&gt;
  &lt;/p:contextMenu&gt;
  </code></pre>
  
  <p>How can I perform something similar for the below written p:contextMenu(dynamic)</p>
  
  <pre><code>&lt;p:contextMenu id="contextMenuId1" model="#{myBean.model}" &gt;&lt;/p:contextMenu&gt;
  </code></pre>