Which library are you using? MyFaces, Trinidad, etc.? The trinidad components display error messages without much effort. You don't need a message tag for each input. You can just do as Stan said and get a FacesContext and call the addMessage method with your FacesMessage. I believe you can set the 1st parameter of the addMessage method to the id of the component the message is for and it will appear next to the control. If you want to put the '*' as part of the component label, then you would use a phase listener to check for messages and then alter the labels for the components that have error messages.
-Richard On 1/29/08, Yaron Spektor <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a form that I would like to validate. Some of the validations are > field validations and some need application-level validation (for example a > country must match a state – where State and Country are 2 different fields > in the form). > > I would like to be able to show * next to the erroneous data. This is > trivial in field validation, but how do I do it in application level > validation? > > A workaround I thought of is holding the components in a map and adding an > * to them if an error occurred, but I am sure there is a simpler less > cumbersome option out there (maybe with phase listeners?). > > I would appreciate any advice, > > Thanks, > > Yaron, > > > > >

