This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSF and the fly likes UiViewRoot - findComponent dont work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "UiViewRoot - findComponent dont work" Watch "UiViewRoot - findComponent dont work" New topic

UiViewRoot - findComponent dont work

javier pavon

Joined: Mar 03, 2010
Posts: 9
I want to add a class to the input with validation error, so I have created a class that implements PhaseListener, and in the method BeforePhase I do this

So, facesContexts return me the ids with messages (validation problems), but if findcomponent return me null;

This happens only withs lists/datatables, for example, if the id = formValidacion:listaPrescripciones:0:j_id511, dont work, but if I sent formValidacion:listaPrescripciones:j_id511 give me the component!!! why??

And, if I add a 'error' class to ui component, like this

If I pass formValidacion:listaPrescripciones:j_id511, then jsf add error class to all the same components in the list/row, not for the row
Any help please?
I agree. Here's the link:
subject: UiViewRoot - findComponent dont work
It's not a secret anymore!