title: How to find a widgetVar?
body: <p>If i have a primefaces component, like</p>
  
  <pre><code>&lt;p:selectOneMenu id="myComponent"&gt;
  ...
  &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>In the html, it will generate something like this:</p>
  
  <pre><code>&lt;div id="myFormName:myComponent" widgetVar="lollipop"&gt;
  ...A lot of things in here...
  &lt;/div&gt;
  &lt;script id="myFormName:myComponent_s"&gt;
     $(function(){PrimeFaces.cw('SelectOneMenu','lollipop',.......
  &lt;/script&gt;
  </code></pre>
  
  <p>Inside the script tag, you can notice the widget var name(if i dont provide it in the component, it will be generated).
  I want to know how can i get the widget var element, or if this is not possible, how can i get that "" tag so i can get the name of this widget var.</p>
  
  <p>------ EDIT ------
  I will try to explain why i need this.
  i have this function:</p>
  
  <pre><code>function simulaTabManoBrow(event){
      var focusedComponent=document.activeElement;
      if(event.keyCode==13){
          //Cancel th edefault enter event(submit the form)
          event.preventDefault();
          event.stopPropagation();
          event.returnValue = false;
          event.cancelBubble = true;
          if((focusedComponent.tagName.toLowerCase()=="input" &amp;&amp; focusedComponent.type.toLowerCase()=="button") || focusedComponent.tagName.toLowerCase()=="button"){
              //If the focused component is a button, click the button.
              focusedComponent.click();
          }else{
              //Press the tab key programatically
              $.emulateTab();
              verifyOneMenu(campoFocado);
          }
      }
  }
  </code></pre>
  
  <p>This function is executed on the body's onkeydown event.
  The goal of this is to replace the default behavior of the enter key by the tab key.
  The only problem of this is, when the focused component is a selectOneMenu and the user hits enter, it correctly behaves like the tab key, but the selectOneMenu previously focused is opened(because this is the default behavior of the component).</p>
  
  <p>So, what i am trying to do, is to call the close() method of the selectOneMenu widget var of that previously focused component.</p>