Attempts to associate an input component with a map / array failed because there were not several components in the JSF component tree, but only one. <ui:repeat> does not start while creating the creation time of the tree of JSF components. Instead, it launches during view rendering, generating HTML output. In other words, the <ui:repeat> child components are reused each time during the generation of the HTML output of each iteration.
Special exception: "Target Unreachable", "BracketSuffix" "null null" was chosen because the variable #{_lang} not available during build time creation, at the moment the user interface component tree was built, and all id and binding . It is only available while viewing rendering.
Those binding attempts would succeed if you used <c:forEach> . It starts during the creation of the JSF component tree creation time. Then you will receive physically several instances of the child components, which, in turn, produce each of its own HTML output without repeating it many times.
Turning on the panel group and finding all the children will obviously not work for the reasons mentioned earlier. <ui:repeat> does not physically generate multiple JSF components in the component tree. Instead, it reuses the same component to output HTML output several times depending on the state of the current iteration of the round.
Replacing with <c:forEach> should have worked. You may have encountered a synchronization problem because it works during build time, and you are preparing a model during, for example. preRenderView instead of @PostConstruct or so.
All of the above is easier to understand if you carefully read the JSTL in JSF2 Facelets ... does it make sense?
As for your specific functional requirement, you usually use Validator for the job. If you register it on an input component, it will be called for each round of iteration. You will immediately have the right input component with the correct state in your hands as the second argument to the validate() method, and the represented / converted value as the third argument.
If you really need to complete the task later, for example, because you need to know about all the inputs, then you must programmatically iterate through <ui:repeat> yourself. You can do this with UIComponent#visitTree() , which allows you to collect the state of input components in each round of iteration.
eg.
final FacesContext facesContext = FacesContext.getCurrentInstance(); UIComponent repeat = getItSomehow(); // findComponent, binding, etc. repeat.visitTree(VisitContext.createVisitContext(facesContext), new VisitCallback() { @Override public VisitResult visit(VisitContext context, UIComponent target) { if (target instanceof UIInput && target.getId().equals("theTitle")) { String clientId = target.getClientId(facesContext); Object value = ((UIInput) target).getValue(); // ... facesContext.addMessage(clientId, message); } return VisitResult.ACCEPT; } });
See also: