Ok, thanks for the hint. Then I'll try this also with a custom renderer. Would it not be a nice extension to allow nested content in the message tag, that will be only rendered if there is an existing message for a field?
E.g. <t:message for="field" showDetail="false" showSummary="false">*</t:message> I am only working with JSF for 2 weeks now and I did not develop my own renderers so far, but would the above be possible with another custom renderer? Could someone evaluate the above theoretically? -----Original Message----- From: Andrew Robinson [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 22. Februar 2006 09:58 To: MyFaces Discussion Subject: Re: simple identification of incorrect fields I have done this using a custom renderer for the t:message tag. In there I set the summary (or detail, I always get those confused on which one is the tooltip), to an asterisk before passing it to the base (myfaces) renderer. I clone the object before changing it though so that the "messages" tag still shows the correct information and not an asterisk. On 2/22/06, Michael Heinen <[EMAIL PROTECTED]> wrote: > I want to show the asterisk only in error cases. > > It is not limited on required fields. > I want to ease the finding of incorrect fields because I don't have > enough room to display detailed error messages beside my fields in the > form. > So I have to show a detailed summary on top of my page and an asterisk > or somewhat beside the fields. > > But I don't know how to achieve this :-( > > -----Original Message----- > From: Sean Schofield [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 22. Februar 2006 08:50 > To: MyFaces Discussion > Subject: Re: simple identification of incorrect fields > > Do you only want to show them when they fail to submit a required > value or do you want to show them all of the time? > > Sean > > On 2/22/06, Michael Heinen <[EMAIL PROTECTED]> wrote: > > I was afraid of having to do this. > > Actually I don't want to override the messages because I want to show > > them in a summary list at the top of my page. > > > > I just want to mark the incorrect fields in addition. > > Is there no other possibility or workaround? > > > > -----Original Message----- > > From: Sean Schofield [mailto:[EMAIL PROTECTED] > > Sent: Dienstag, 21. Februar 2006 19:19 > > To: MyFaces Discussion > > Subject: Re: simple identification of incorrect fields > > > > The required message doesn't work this way. You need to override the > > value in Message.properties if you want to use just an asterisk > > character. > > > > The defaults are ... > > > > javax.faces.component.UIInput.REQUIRED = Validation Error > > javax.faces.component.UIInput.REQUIRED_detail = "{0}": Value is > > required. > > > > If you check the spec docs you can see the various ways to overload > > these and replace them with your own. > > > > Sean > > > > > > > > On 2/21/06, Michael Heinen <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi all, > > > > > > > > > > > > I display at the top of my page a summary of all error messages. > > > > > > > > > > > > In addition I try to mark all incorrect fields with a '*' or another > > symbol. > > > > > > Currently I have no idea how to implement this in an easy way. > > > > > > > > > > > > The following simple approach is not working: > > > > > > <h:inputText id="searchName" value="#{ControllerBean.searchName}" > > > required="true"/> > > > > > > <t:message for="searchName" showDetail="false" > > > showSummary="false">*</t:message> > > > > > > > > > > > > If I enclose the '*' with a verbatim tag it will be always displayed > > (even > > > without errors). > > > > > > > > > > > > I'am sure this is a common requirement therefore this question. > > > > > > > > > > > > Michael > > > > > > > > >

