You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Travis Reeder <tr...@gmail.com> on 2005/12/12 06:20:16 UTC

Duplicate messages

Anyone seeing duplicate messages from h:messages in the latest source?

Travis

Re: Duplicate messages

Posted by Adam Winer <aw...@gmail.com>.
It's "right", in that this is the behavior required by the spec.
It's wacky, in that the spec behavior (in this case, something
that Craig kinda chucked in without much EG discussion) is
something I've never cared for.

t:messages could add behavior that if detail==summary,
don't show both.

-- Adam


On 12/13/05, Travis Reeder <tr...@gmail.com> wrote:
> I figured out why this was happening, if you turn on showDetail="true", but
> your messages don't have details, then it uses the summary text as the
> details text....  Why?  Because the javadocs say:
> public
> java.lang.String getDetail()
>
>
> Return the localized detail text. If no localized detail text has been
> defined for this message, return the localized summary text instead.
> So you get something like this as output:
>
> <ul><li><span class="infoMsg">My success message. My success message.
> </span></li></ul>
>
> Is it just me, or does that seem a little whacky (aka totally wrong)?  I
> would expect it to not show a detail message if I explicitly set the detail
> message to null, wouldn't you?
>
> Travis
>
>
> On 12/11/05, Travis Reeder <tr...@gmail.com> wrote:
> > Anyone seeing duplicate messages from h:messages in the latest source?
> >
> > Travis
> >
> >
>
>

Re: Duplicate messages

Posted by Travis Reeder <tr...@gmail.com>.
I figured out why this was happening, if you turn on showDetail="true", but
your messages don't have details, then it uses the summary text as the
details text....  Why?  Because the javadocs say:

public java.lang.String *getDetail*()

Return the localized detail text. If no localized detail text has been
defined for this message, return the localized summary text instead.

So you get something like this as output:

<ul><li><span class="infoMsg">My success message. My success message.
</span></li></ul>

Is it just me, or does that seem a little whacky (aka totally wrong)?  I
would expect it to not show a detail message if I explicitly set the detail
message to null, wouldn't you?

Travis


On 12/11/05, Travis Reeder <tr...@gmail.com> wrote:
>
> Anyone seeing duplicate messages from h:messages in the latest source?
>
> Travis
>
>