Hi,
For t:message and t:messages, there's already a forceSpan attribute, will it
work for you Ernst?
Cagatay
On Tue, Mar 25, 2008 at 11:17 PM, simon <[EMAIL PROTECTED]> wrote:
>
> On Tue, 2008-03-25 at 21:45 +0100, simon wrote:
> > On Tue, 2008-03-25 at 20:50 +0100, Ernst Fastl wrote:
> > > Hi,
> > >
> > > I would like to add renderedIfEmpty to the t:messages component which
> > > per default is false (current behaviour)
> > > The reason for that: To update/append FacesMessages to a
> > > messages-component after AJAX requests (e.g. PPR)
> > > it has to be possible to locate a DOM element to which this messages
> > > can be appended.
> > >
> > > One could also think of automatically adding a CSS-style display:none
> > > if the empty table/list is rendered which is
> > > reset by any JavaScript updates to the messages.
> > >
> > > Alternatively we could create a new messages-component which supports
> that.
> > >
> > > If anybody can think of reasons why this parameter should not be added
> > > please tell. Otherwise I'll file a JIRA issue
> > > and start implementing on thursday evening.
> >
> > Does your second suggestion ("CSS-style display:none") mean to always
> > render the div, but when there are no messages do:
> > <div id=".." style="display:none"/>
> > and let javascript modify the style if messages need to be added to it
> > after a ppr request?
> >
> > If so, I think that is nicer. Logically, it makes sense too; the
> > h:messages has not been marked with rendered=false, it just happens to
> > have no messages. So the div should be present, but hidden.
> >
> > And it means that no extra attribute is needed.
> >
> > I cannot imagine any application that would break because of the
> > introduction of a div with display:none set.
>
> BTW, I was thinking about making this change in h:messages, not just in
> t:messages.
>
> However even if the change is done in core, the same functionality would
> still be needed in t:messages unless Sun Mojarra's h:messages component
> also renders a hidden div when empty. Any idea what Mojarra does here?
>
> Regards,
> Simon
>
>