myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "superjoerch@gmx.de" <superjoe...@gmx.de>
Subject Re: How to set a converter default property?
Date Thu, 10 Jul 2008 08:26:19 GMT
Hi Simon, that's right i have the problem with a validator not with a 
converter.
-Jörg

simon.kitching@chello.at schrieb:
> Volker Weber schrieb:
>> Hi simon,
>>
>> 2008/7/10 simon.kitching@chello.at <simon.kitching@chello.at>:
>>
>> [...]
>>  
>>> The JSF standard does not support this. When defining a validator in a
>>> faces-config.xml file, the only supported xml elements are 
>>> validator-id and
>>> validator-class.
>>>     
>> [...]
>>
>> The http://java.sun.com/dtd/web-facesconfig_1_1.dtd support property
>> on validator:
>>
>> <!--
>>     The "validator" element represents a concrete Validator 
>> implementation
>>     class that should be registered under the specified validator 
>> identifier.
>>     Validator identifiers must be unique within the entire web 
>> application.
>>
>>     Nested "attribute" elements identify generic attributes that may be
>>     configured on the corresponding UIComponent in order to affect the
>>     operation of the Validator.  Nested "property" elements identify 
>> JavaBeans
>>     properties of the Validator implementation class that may be 
>> configured
>>     to affect the operation of the Validator.
>> -->
>> <!ELEMENT validator       (description*, display-name*, icon*,
>> validator-id, validator-class, attribute*, property*)>
>>   
>
> Ah, I didn't know that.
>
> It appears that whoever implemented the faces-config parsing didn't 
> know that either. Here's code from 
> DigesterFacesConfigUnmarshallerImpl.java (core/trunk12):
>
>        digester.addCallMethod("faces-config/validator", 
> "addValidator", 2);
>        digester.addCallParam("faces-config/validator/validator-id", 0);
>        digester.addCallParam("faces-config/validator/validator-class", 
> 1);
>
> So it looks like at the moment the only supported child elements of 
> <validator> are validator-id and validator-class.
>
> Note that in the same method, the <converter> tag does appear to be 
> handled correctly, with digester rules existing for nested attribute 
> and property elements.
>
> Just by the way, the subject on the original email was about 
> "converter", but the example was about "validator". I presume the 
> problem really is with a validator....
>
> Regards,
> Simon
>
>



Mime
View raw message