Looking at your example you have 3 ui:includes. The following 3 things you need to be aware of when using ui:include.Hmm, let's see.
1. all ui:include tags is included in the compiled version of the Facelet page.1. There is no such thing as a 'compiled version of a Facelets page'. Facelets pages are not compiled.
2. when using ui:include it becomes your responsibility to make sure those ui:included pages do not have clashing ids.2. It is always your responsibility to avoid clashing ids, whether using ui:include or not. You can make your life simpler by not using ids at all, or in this case, by wrapping each include in an id-scoping container rather than in a ui:fragment.
So looking at your example I would say you are doing the right thing.I wouldn't.
mojarra wrote:Please don't tell people what they should be doing, especially when you have only 15 posts to your name. You are not here to determine what is right or wrong, I hope your ego is not that big and you're just making a mistake.
And EJP, if you think he should not be doing it this way please do tell how you would do it. Instead of just saying I wouldn't. Thanks!
1. A Facelet pages gets parsed and then it gets put into a Facelets cache (this cache I consider the compiled version of a Facelet page).You can consider it what you like, but there is still no compilation step. JSPs are compiled. Facelets pages are parsed and then interpreted. It isn't the same thing. You don't get anywhere by misusing standard terminology except to create unnecessary confusion.
And EJP, if you think he should not be doing it this way please do tell how you would do it. Instead of just saying I wouldn't.I did. I said to use an id-scoping container instead of ui:fragment. You missed it.
(I think this is taken out of context. I am trying to express that I am here to help not to pass the ultimate judgment on what should be done. If an example can accomplish what they are trying to do I would say it is right, if it would not do that I would say it is wrong).I must have missed the part where you provided any example at all, let alone one that was right or wrong.