myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: [Trinidad] panelLabelAndMessage still needs extra message tag?!
Date Wed, 05 Sep 2007 01:40:41 GMT
On 9/4/07, Stephen Friedrich <trinidad@eekboom.com> wrote:
>
> Andrew Robinson wrote:
> > No, it requires a "for" attribute. That is the component that the
> > label and the message are for. Also in 1.0.3 the code will
> > automatically use the first EditableValueHolder it finds if the for is
> > not given, but it still only supports one component. To get multiple
> > components, you have to have multiple panelLabelAndMessage components.
> Hm, that kind of defeats the purpose of panelLabelAndMessage:
> I nested firstName and lastName fields in a single panelLabelAndMessage
> to have them shown in a single row of a form managed by panelFormLayout.
> Of course I'd like to show messages for both of them.
> How can I do that?


The simplest way I can think of is to use panelLabelAndMessage
containing a panelHorizontalLayout with two non-simple fields,
where you haven't set the label on either (but do set the shortDesc
attribute for accessibility).

-- Adam


Can I switch the automatic message part OFF and then add two tr:message
> tag (one for each input field)? Then again that would require some
> additional layout to get the messages to appear under the correct field.
>
> It really would be easiest to be able to have a "semi-simple" where the
> component does not manage its label, but manages its own message.
> simple="message-only" ?
>
> BTW: The same structure repeats in my app with other pairs with other
> pairs (zip/city, start/end date, street/no, ...).
>
>

Mime
View raw message