Ok, got it.

Thanks,

On Tue, Jun 8, 2010 at 12:50 AM, Jakob Korherr <jakob.korh...@gmail.com>wrote:

> Hi Ali,
>
> Nope, it does it in the right phase and is used by
> UIComponent.getConvertedValue().
>
> Regards,
> Jakob
>
>
> 2010/6/7 Ali Ok <al...@aliok.com.tr>
>
>> Hi Leonardo,
>>
>>
>>> Shouldn't override Renderer.getConvertedValue(FacesContext, UIComponent,
>>> Object) work in this case?
>>
>> That approach makes the validation at the rendering phase, doesn't it?
>> Is it OK to make such validation on that phase; after phases that do
>> conversion, validation and model update?
>>
>> Thanks,
>> Ali
>>
>> On Tue, Jun 8, 2010 at 12:36 AM, Leonardo Uribe <lu4...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> Shouldn't override Renderer.getConvertedValue(FacesContext, UIComponent,
>>> Object) work in this case?
>>>
>>> regards,
>>>
>>> Leonardo Uribe
>>>
>>> 2010/6/7 Ali Ok <al...@aliok.com.tr>
>>>
>>> Hi,
>>>>
>>>> For <hx:color> component, I want to make sure sent value is a valid
>>>> simple color[0]. e.g: #F0A1B2
>>>> This is a good use case for a converter, but necessity for automatic
>>>> attaching makes things complicated.
>>>>
>>>> I tried the approaches below, all of them have some problems, and I
>>>> don't want to follow them.
>>>>
>>>> * Overriding setValue(..) method in HtmlInputColor which is the
>>>> component class :=) (breaks JSF lifecycle. Some manual validation is done,
>>>> even though validator processing phase is over)
>>>> * Attaching "ColorValidator implements Validator" at facelet handler
>>>> * At facelet handler, attaching "ColorConverter implements Converter"
>>>> which converts input to "Color" model pojo  (a component can have one
>>>> converter, so we should prevent other converters being attached, which is
>>>> unacceptable)
>>>>
>>>> Do we have a better alternative? Any example?
>>>>
>>>> [0]
>>>> http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#valid-simple-color
>>>>
>>>> Regards,
>>>> Ali
>>>>
>>>> --
>>>> My Blog: http://blog.aliok.com.tr
>>>> Twitter: http://twitter.com/aliok_tr
>>>>
>>>
>>>
>>
>>
>> --
>> My Blog: http://blog.aliok.com.tr
>> Twitter: http://twitter.com/aliok_tr
>>
>>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>



-- 
My Blog: http://blog.aliok.com.tr
Twitter: http://twitter.com/aliok_tr

Reply via email to