dev@javaserverfaces.java.net

Re: JSR-252 Issue 21 - Provided an additional "binding" attribute for the core Converter, Listener and Validator tags does not fit as spec doc says

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Mon, 29 Oct 2007 13:40:17 -0500

Sorry, I read the question and answer the wrong semantic.

The previour behaviour jsf 1.2.04-p02 do the following:

    * This is the message for phase before RENDER_RESPONSE 6
    * Component:javax.faces.component.html.HtmlInputText_at_186f3b3 converter:
com.sun.faces.taglib.jsf_core.ConverterTag$BindingConverter_at_e9aa13
    * Validator:null
    * Converter:null
    * ActionListener:null

My suposition is the binding or delegate classes are instantiated instead
and the real impl do not. By this way,
The delegate class save an restore the info necessary to create the real
impl of the converter and validator, but it's
not necessary to assign binding attributes right now.

The problem is when you execute a method like getConverter(), it returns
this:

converter:
com.sun.faces.taglib.jsf_core.ConverterTag$BindingConverter_at_e9aa13

Saving the binding class on the state warrants the lazy loading.

But now this method are returning this:

converter: javax.faces.convert.BigIntegerConverter_at_1e090ee

so something changed, but I do not know anything about the code of jsf ri,
(but a little of myfaces), so
I cannot check what happens.

When the values are submitted it returns the following (just an extract)

    * This is the message for phase before PROCESS_VALIDATIONS 3
    * Component:javax.faces.component.html.HtmlInputText_at_182a033 converter:
com.sun.faces.taglib.jsf_core.ConverterTag$BindingConverter_at_e391c4
    * Validator:null
    * Converter:null
    * ActionListener:null

    * This is the message for phase after PROCESS_VALIDATIONS 3
    * Component:javax.faces.component.html.HtmlInputText_at_182a033 converter:
com.sun.faces.taglib.jsf_core.ConverterTag$BindingConverter_at_e391c4
    * Validator:org.apache.myfaces.bindingCLV.DummyValidator_at_c713d2
    * Converter:javax.faces.convert.BigDecimalConverter_at_1e6696c
    * ActionListener:null

Showing the lazy load of converters and validators on PROCESS_VALIDATIONS
phase.

The binding variable is set properly (setting the real impl and not the
delegator class) the first time
is called getAsString or getAsObject for converters.

The ideal way is that after PROCESS_VALIDATIONS returns this:

    * This is the message for phase after PROCESS_VALIDATIONS 3
    * Component:javax.faces.component.html.HtmlInputText_at_182a033 converter:
javax.faces.convert.BigDecimalConverter_at_1e6696c
    * Validator:org.apache.myfaces.bindingCLV.DummyValidator_at_c713d2
    * Converter:javax.faces.convert.BigDecimalConverter_at_1e6696c
    * ActionListener:null

I hope this helps. But still there is a question on the air: żIs lazy
loading the way to set bindings on Validators, Converters and
ActionListenter

regards

Leonardo Uribe