Ok I figure this out:

<h:messages showDetail="true" showSummary="false" layout="table" 
styleClass="error"/>

I think when I put this in the panelGroup it found the individual messages 
which I 
guess are in the detail not the summary (the summary was the same for all of 
them). 
Then I used a phase listener similar to the one Hans Bergsten discusses in 

http://www.oracle.com/technology/pub/articles/masterj2ee/j2ee_wk7.html

to strip the client id prefix and replace it with my own field name attribute 
value.

Now I get messages in a table like:

Created Start Date: Specified value is not a valid date/time. 
Modified Start Date: Specified value is not a valid date/time. 

It looks like myfaces is using it's own messages for conversion errors so that 
instead 
of the message name for a conversion being 

javax.faces.component.UIInput.CONVERSION

it is specific to the converter (in my case it was) 

javax.faces.convert.DateTimeConverter.CONVERSION

Someone oughta make this thread into a "Messages HOW-TO".

--
Rob

@objectsource.org


---------- Original Message -----------
From: "Rob Decker" <[EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Fri, 15 Apr 2005 16:34:00 -0400
Subject: Re: message(s)

> The panelGroup fix worked. I would prefer to simply put:
> 
> <h:messages globalOnly="false" styleClass="error"/>
> 
> Is this a bug (that client id'd messages don't get displayed) anyone else has 
> experienced?
> 
> --
> Rob
> 
> @objectsource.org
> 
> ---------- Original Message -----------
> From: Heath Borders <[EMAIL PROTECTED]>
> To: MyFaces Discussion <[email protected]>
> Sent: Fri, 15 Apr 2005 15:25:24 -0500
> Subject: Re: message(s)
> 
> > The reason for that is a problem with JSP 1.2. Currently, if you want to 
> > reference a component in a "for" attribute that is placed ahead of the 
> > referencing component in a JSP, you need to wrap both tags in a 
> > <h:panelGroup />.
> > 
> > On 4/15/05, Rob Decker <[EMAIL PROTECTED]> wrote: 
> > > 
> > > Where do I find them? Are they all in one file, like
> > > 
> > > "myfaces-custom-message.properties"
> > > 
> > > Do you know what's called, where it is?
> > > 
> > > 
> > > --
> > > Rob
> > > 
> > > @objectsource.org <http://objectsource.org>
> > > 
> > > ---------- Original Message -----------
> > > From: "Srikanth Madarapu" <[EMAIL PROTECTED]>
> > > To: "MyFaces Discussion" <[email protected]>
> > > Sent: Fri, 15 Apr 2005 15:52:46 -0400
> > > Subject: RE: message(s)
> > > 
> > > > You can put all the error messages in your own config file and use that 
> > > as the
> > > > resource bundle. That way you can customize the error messages a little 
> > > bit.
> > > > That's what I have done, I didn't liked the double quotes around the id 
> > > of the
> > > > component, so took them out using my own config file.
> > > >
> > > > Srikanth
> > > >
> > > > -----Original Message-----
> > > > From: Rob Decker [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, April 15, 2005 3:40 PM
> > > > To: MyFaces Discussion
> > > > Subject: RE: message(s)
> > > >
> > > > Well then how do I show the summary? Is this a "feature" of myfaces or 
> > > in the
> > > > spec? It's not in the doc for message. Are you saying that the 
> > > identifier is
> > > > the summary?
> > > >
> > > > The docs say showSummary=false is the default anyway. Do I have to 
> > > explicitly
> > > > specify the default value?
> > > >
> > > > I thought myfaces versions of components were prefixed with x: and that 
> > > the h:
> > > > versions are in line with the specification?
> > > >
> > > > --
> > > > Rob
> > > >
> > > > @objectsource.org <http://objectsource.org>
> > > >
> > > > ---------- Original Message -----------
> > > > From: "Srikanth Madarapu" <[EMAIL PROTECTED]>
> > > > To: "MyFaces Discussion" <[email protected]>
> > > > Sent: Fri, 15 Apr 2005 15:24:04 -0400
> > > > Subject: RE: message(s)
> > > >
> > > > > The showSummary=false will not show the identifier.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Rob Decker [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, April 15, 2005 3:18 PM
> > > > > To: my-faces-user
> > > > > Subject: h:message(s)
> > > > >
> > > > > The docs for h:messages says
> > > > >
> > > > > "Flag indicating that only global messages (that is, messages not 
> > > associated
> > > > > with any client identifier) are to be displayed. Default value is 
> > > "false"."
> > > > >
> > > > > But I only get messages for which there is no client identifier even 
> > > when I
> > > > > specificy it as false (and client id messages do exist because 
> > > h:message for=
> > > > > shows them).
> > > > >
> > > > > I also tried to override the default conversion message with:
> > > > >
> > > > > javax.faces.component.UIInput.CONVERSION=Invalid Format
> > > > >
> > > > > in my own Messages.properties file (which seems to be ok with 
> > > overriding other
> > > > > messages).
> > > > >
> > > > > The other thing is that a message with a client identifier prepends 
> > > the
> > > > > identifier to the message, e.g. "_id0:_id4 : There was an error". Is 
> > > it
> > > > > supposed to that or is that something 'extra' the myfaces 
> > > implementation
> > > > > offers. Is there a way to turn that off?
> > > > >
> > > > > --
> > > > > Rob
> > > > >
> > > > > @objectsource.org <http://objectsource.org>
> > > > ------- End of Original Message -------
> > > ------- End of Original Message -------
> > > 
> > >
> > 
> > -- 
> > -Heath Borders-Wing
> > [EMAIL PROTECTED]
> ------- End of Original Message -------
------- End of Original Message -------

Reply via email to