users@woodstock.java.net

Setting textField valid=false in table.

From: Steven Bell <bell.steven_at_gmail.com>
Date: Tue, 8 Jan 2008 08:24:12 -0800

Hi,

I have a table used to enter line detail information. It's basically a
table with several columns, each one has a textField. When the form is
submitted I need to display and validation errors. At one point in a
backing bean I know that I have an error for a specific field on a specific
row. I add a FacesMessage to the context and I can show the message in a
messageGroup or message with the for attribute set easily, but I cannot
figure out how to set the textFields valid property to false, so that it
renders as in error (yellow background).

About the only think I could think to try was to get the component out of
the FacesContext and set valid to false, but there is only one textField for
the column at that point, and setting it's valid property seems to have no
effect.

Any ideas?

-- 
Regards,
Steven Bell