Line numbers are not considered significant in
JSF. I thing you mean something more like item number here.
The rules are completely different for JSF than JSTL. If you're trying to get the same effect using ui:repeat, all
you should need is just 'id="1234"'. The JSF framework will add extra layers to the generated ID to make it unique. However, I recommend you look at the displayed HTML after you do that so you can see how it's synthesizing the ID, since if you plan to reference it with your own JavaScript code, you'll need the full (generated) ID, not just the ID you code in the JSF.
I hope you're not really mixing JSTL and JSF here. JSTL on JSF pages is trouble at the best of times.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.