Firstly I do not know how many rows of <tr:image /> will be there...and I wanted to append image_1,_2,_3...._10....my question is how do I generate that increasing number in JSF, and assign that to 'id' attribute?
Joined: Oct 08, 2006
Oh, you have only one tr:image component inside some UIData component (a table or so)? Why did you mention that you have more tr:image components? Did you check the HTML output, do you see more <tr:image> elements? No, you just see more <img> elements.
No, that's not possible. Just assign it a fixed ID to it. JSF will prepend the row ID to it automatically.
Why this question? Are you just facing a problem for which you think that fixing the ID is the solution? In the future it will be more helpful if you just elaborate about the actual problem instead of asking how to achieve something of which you think that it is the right solution (which may not be a right solution at all, as you see now).
subject: assign a defined Id to all the tags in JSF