We shouldn't be using ids in templates; they are required to be unique so this makes it too easy for users to unwittingly end up with id collisions. Using itemId is probably ok, though if you can select on some other property that isn't likely to change, that's ideal.