Are you sure you blanked it out?

If you take a look at javax.faces.component.UIInput.validate(), you'll see

        if (submittedValue == null) return;
        Object convertedValue = getConvertedValue(context, submittedValue);

It seems to me that you'd never trigger the converter if the value was
not specified.   I don't think http sends back form data for empty
inputs, but maybe I'm wrong.

You could try setting a breakpoint on the code above and examine the
contents of submittedValue to see what it holds.

On 11/3/05, Virtudazo, Dennis (Exchange) <[EMAIL PROTECTED]> wrote:
> I have an inputText that is not required, that uses the
> f:convertDateTime tag. If I blank out the inputText it causes a dateTime
> conversion error. How can I skip the conversion when the input is blank?
>
> Below is the code:
>
> <h:inputText id="startTime" value="#{bean.startTime}" required="false">
>   <f:convertDateTime type="time" timeStyle="short"/>
> </h:inputText>
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
>

Reply via email to