you may want to be more specific. could you post the exact error you get? the contents of each of these modal#.xhtml ?
I want to do that, but it's almost impossible because each of these modal#.xhtml is quite big. That's the reason I want to write a small example.
Do you think it is safe or dangerous to use c:if which has ui:include inside and then refresh a part of the page which includes these c:if?
Do you ever have any problem using c:if and ajax?
I suggest to set all IDs explicitly or use "rendered" attribute instead of c:if.