cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: svn commit: r226493 - /cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
Date Tue, 02 Aug 2005 09:18:51 GMT
Jason Johnston wrote:

>On Mon, 2005-08-01 at 16:38 +0200, Sylvain Wallez wrote:
>  
>
>>>? The <fi:validation-errors> element is  described here:  
>>>http://cocoon.apache.org/2.1/userdocs/forms/xslt.html#fi%3Avalidation- 
>>>errors
>>>      
>>>
>>Yes, sure. Where I'm lost is about knowing *what* produces this 
>>fi:validation-errors element (it's not a widget, isn't it?). I never 
>>used it, and a quick search did not revealed how it is produced.
>>    
>>
>
>You are correct, it is not "produced" by anything besides the template
>author.  It's simply a styling hint, much like fi:group, which is
>handled entirely by the XSLT.
>  
>

Ok, I see.

>Unfortunately this means that it is never included in the AJAX browser-
>update XML since there's nothing to ensure it's wrapped in a <bu:update>
>element.  (Hmm, would manually wrapping it in a <bu:update> in the
>template do the trick?  I wonder.
>

Yes, wrapping it with a <bu:update> would definitely update it. But that 
would occur at each and every form roundtrip.

>It would definitely need an id
>attribute though.)
>

Yep.

>I think there's a definite usefulness in having it
>AJAX-enabled, so perhaps it needs to be handled further upstream, e.g.
>in FormsTemplateTransformer.  Should it become an ft-namespaced element
>instead like <ft:validation-errors id="someId" />?  Thoughts?  I'm
>willing to take a whack at putting together a patch, with guidance.
>  
>

AFAIU its purpose, that would be a widget that collects validation 
errors from a set of other widgets. Its validate() method would check 
the if the collected validation errors have changed, and if yes trigger 
the page refresh.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message