title: When resolving XPages/JSF IDs, why is :0 sometimes appended?
body: <p>I'm using Expression language to give to a client-side Javascript function the ID of a particular DIV. I'm using this:</p>
  
  <pre><code>"#{id:repeatsecondlevelnodes}"
  </code></pre>
  
  <p>Firstly, I'm not at all sure how the resolver finds the 'real' ID. I'm assuming that it's something similar to CSS Selectors, but I have been unable to find authoritative documentation on it. I'd appreciate any link to any kind of documentation.</p>
  
  <p>Secondly, I don't get why sometimes the resolved value is postfixed with :0</p>
  
  <p>Sometimes I'll get</p>
  
  <pre><code>view:_id1:repeatfirstlevelnodes:1:repeatsecondlevelnodes:0
  </code></pre>
  
  <p>when I'm expecting</p>
  
  <pre><code>view:_id1:repeatfirstlevelnodes:1:repeatsecondlevelnodes
  </code></pre>
  
  <p>and I don't get what's causing the difference. So far I've hacked it by just removing :0 if I encouter it, but I'd rather understand how the resolver actually works.</p>
  
  <p><a href="https://i.stack.imgur.com/IKnfb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IKnfb.png" alt="the source of my confusion"></a></p>