You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mfaine <mf...@knology.net> on 2005/06/06 15:43:37 UTC

Validation Error with inputCalendar

Myfaces 1.0.9 - SVN sources from today.

I have the following in my JSP:

        <%-- effective date --%>
        <h:outputLabel id="outputLabel16" for="effectiveDate"
value="#{msg.nasageneral_effective_date}"/>
        <x:inputDate id="effectiveDate"
value="#{nasaGeneralBean.effectiveDate}" required="true" popupCalendar="true"/>
        <h:panelGroup id="panelGroup14">
          <h:outputLabel id="outuptLabel17" for="effectiveDate"
value="#{msg.common_required_char}" styleClass="requiredchar"/>
          <h:message id="message12" for="effectiveDate"/>
        </h:panelGroup>

When this is rendered the id gets broken into three:

id="form4:effectiveDate.day",
id="form4:effectiveDate.month",
id="form4:effectiveDate.year" 

The problem is that all of my "for" attributes refer to
form4:effectiveDate".  This causes a validation error when the validator
can't find the id given in the for attribute.

I've tried changing values for both the for attribute and the id attribute
but it seems to only cause more/different problems.

Thanks,
-Mark


Re: Validation Error with inputCalendar

Posted by Martin Marinschek <ma...@gmail.com>.
Well, it's inputDate that is causing this validation error.

You might get Sylvain to look at it, but please post a bug report.

regards,

Martin

On 6 Jun 2005 13:43:37 -0000, mfaine <mf...@knology.net> wrote:
> Myfaces 1.0.9 - SVN sources from today.
> 
> I have the following in my JSP:
> 
>         <%-- effective date --%>
>         <h:outputLabel id="outputLabel16" for="effectiveDate"
> value="#{msg.nasageneral_effective_date}"/>
>         <x:inputDate id="effectiveDate"
> value="#{nasaGeneralBean.effectiveDate}" required="true" popupCalendar="true"/>
>         <h:panelGroup id="panelGroup14">
>           <h:outputLabel id="outuptLabel17" for="effectiveDate"
> value="#{msg.common_required_char}" styleClass="requiredchar"/>
>           <h:message id="message12" for="effectiveDate"/>
>         </h:panelGroup>
> 
> When this is rendered the id gets broken into three:
> 
> id="form4:effectiveDate.day",
> id="form4:effectiveDate.month",
> id="form4:effectiveDate.year"
> 
> The problem is that all of my "for" attributes refer to
> form4:effectiveDate".  This causes a validation error when the validator
> can't find the id given in the for attribute.
> 
> I've tried changing values for both the for attribute and the id attribute
> but it seems to only cause more/different problems.
> 
> Thanks,
> -Mark
> 
>