I need to mark inputText field generated using ui:repeat as invalid. I am able to do it for normal input fields by using following code in bean:
UIComponent root = context.getViewRoot();
UIInput inputFieldObj = obj.findComponent(root, id);
inputFieldObj .setValid(false);
The above code is working, however when I try to get the components that are generated using ui:repeat. Its not marking the textfield as invalid.
So for below code its working:
<p:inputText id="txtEmpId12" />
But for this its not:
<ui:repeat>
<p:inputText id="txtEmpId" />
</ui:repeat>