-
1. Re: Validation messages inside ui:repeat
christian.bauer Jan 16, 2008 12:20 PM (in response to fromage)My guess is that it won't work with ui:repeat because it just renders the /same/ component several times, not creating new components in the tree. You probably need to use c:forEach, which generates several components in the tree. Read this article http://www.ilikespam.com/blog/c:foreach-vs-ui:repeat-in-facelets.
-
2. Re: Validation messages inside ui:repeat
fromage Jan 29, 2008 10:08 AM (in response to fromage)Sorry for the late answer, and thanks for your helpful answer.
I've read this linked page and what I understand from it is that from a ui:repeat tag I should not be able to use custom tag handlers or ui:include and see the variable introduces by ui:repeat. Yet it works (mostly I was using it before I read and understood the page you pointed me to): I can use custom tag handlers and ui:include in ui:repeat, using the loop variable it introduces.At least it works in the view, the editing of things inside it is shakier.
So is it something that changed since this page was posted, or is it just sheer luck that I can do some of the things the page says should not work ?
But these questions are pretty far from my original post, to get back to it:
I understand there's only one instance of an input field even if it's in a ui:repeat. The fact is that I'm only showing it once, because I can only edit one line at a time of the table I'm creating with ui:repeat.
I'm not sure I understand the reason why I cannot add validation messages that would appear next to that input field, when it works outside of ui:repeat. I hope I'm not asking a really stupid question which was answered from the page you refer to, which I failed to see there :)
Thanks for your help!
-
3. Re: Validation messages inside ui:repeat
gavin.king Feb 2, 2008 4:17 AM (in response to fromage)If you have a way to discover the client id of the control, you can add FacesMessages explicitly by client id (which is different for each rendered instance of the control), however, figuring out the client id can tend to be a bit tricky :-/
-
4. Re: Validation messages inside ui:repeat
fromage Feb 7, 2008 10:21 AM (in response to fromage)Yes, I don't understand why there isn't an API to do that...
Thanks for your answer though :)