Ugo Cei wrote:
Il giorno 01/ago/05, alle 15:24, Sylvain Wallez ha scritto:
Tags with an @id is an essential piece of the Ajax stuff, which is
based on partial updates of page areas found by their id.
Your update removes the @id on the enclosing tag, and removes the
placeholder that is necessary when no error exist to later replace it
by something visible if error appear.
If I'm not mistaken, that instruction copied the "id" attribute of the
<fi:validation-errors> element, but I've never put an id attribute
there. Is it necessary to set an id to every <fi:validation-errors>
element in order for it to appear when ajax="true"? If this is the
case, now I know why my <fi:validation-errors> blocks don't render
anymore when ajax="true" :-/
Actually, I'm a bit lost here: what template instruction or widget
produces this <fi:validation-errors> element?
Also, if this is the case, the <div> element should be output
regardless of whether there are validation errors or not, right?
Yes. Have a look at the template for "fi:placeholder", which is what is
produced by hidden fields in order to mark their place in the page if an
event-listener changes their state.
Not that putting it back is a problem, I am just trying to understand.
The only real issue I had was with the <div> not having a class
attribute, but while I was at it, I tried to optimize away a useless
element and an empty attribute.
I understand. But actually, they _are_ useful (in the general cases, as
I don't know where <validation-errors> come from).
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director