myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Vieujot <svieu...@apache.org>
Subject Strange problem with h:selectBooleanCheckbox
Date Mon, 07 Feb 2005 03:11:52 GMT
I've been trying to find why the h:selectBooleanCheckbox looses it's
submit value.

I've found that the decode seems to work fine. The following
modification in HtmlCheckBoxRendererBase prints the proper submitted
value.
But somehow, in the rendering phase, the submitted value has been set to
null again.

If someone has any idea, it would help !

    public void decode(FacesContext facesContext, UIComponent
uiComponent) {
        RendererUtils.checkParamValidity(facesContext, uiComponent,
null);
        if (uiComponent instanceof UISelectBoolean) {
System.out.print("Going for decode ... ");
            HtmlRendererUtils.decodeUISelectBoolean(facesContext,
uiComponent);
System.out.println(((UISelectBoolean)uiComponent).getSubmittedValue());
        } else if (uiComponent instanceof UISelectMany) {
            HtmlRendererUtils.decodeUISelectMany(facesContext,
uiComponent);
        } else {
            throw new IllegalArgumentException("Unsupported component
class "
                    + uiComponent.getClass().getName());
        }
    }

Thanks,

Sylvain.

Mime
View raw message