You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Martin Koci <Ma...@aura.cz> on 2007/08/30 12:19:53 UTC
[Trinidad] SimpleSelectOneRenderer.getSubmittedValue bug?
Hello,
why has SimpleSelectOneRenderer such implementation of
getSubmittedValue:
Object submittedValue = super.getSubmittedValue(context,
component,
clientId);
if (submittedValue == null)
submittedValue = "";
return submittedValue;
The suspicious part is : submittedValue = "" - it leads to
processUpdates on CoreSelectOneChoice, because not-null submitted value
means "component is in request"
See UIXEditableValue.validate(FacesContext):
// Submitted value == null means "the component was not submitted
// at all"; validation should not continue
Object submittedValue = getSubmittedValue();
if (submittedValue == null)
return;
It this a bug?
Regards,
Martin Kočí
Re: [Trinidad] SimpleSelectOneRenderer.getSubmittedValue bug?
Posted by Gabrielle Crawford <ga...@oracle.com>.
I don't think it's a bug, for example required validation will not run
if you return null.
Thanks,
Gabrielle
Martin Koci wrote:
> Hello,
>
> why has SimpleSelectOneRenderer such implementation of
> getSubmittedValue:
>
>
> Object submittedValue = super.getSubmittedValue(context,
> component,
> clientId);
> if (submittedValue == null)
> submittedValue = "";
>
> return submittedValue;
>
>
>
> The suspicious part is : submittedValue = "" - it leads to
> processUpdates on CoreSelectOneChoice, because not-null submitted value
> means "component is in request"
>
> See UIXEditableValue.validate(FacesContext):
>
> // Submitted value == null means "the component was not submitted
> // at all"; validation should not continue
> Object submittedValue = getSubmittedValue();
> if (submittedValue == null)
> return;
>
> It this a bug?
>
>
> Regards,
>
> Martin Kočí
>
>
>