[richfaces-issues] [JBoss JIRA] (RF-12594) rich:calendar defaultLabel causes conversion error if not populated.

Justin Rosenberg (JIRA) jira-events at lists.jboss.org
Tue Dec 4 18:34:21 EST 2012


    [ https://issues.jboss.org/browse/RF-12594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739512#comment-12739512 ] 

Justin Rosenberg edited comment on RF-12594 at 12/4/12 6:33 PM:
----------------------------------------------------------------

Lukáš,

  I tried using the placeholder component in the following manner with the latest 4.3.0-SNAPSHOT

{code}
<h:panelGroup layout="block" styleClass="controls">
	<rich:calendar enableManualInput="true" value="#{managedBean.dob}" id="dob" locale="US" popup="true" datePattern="MMddyyyy" showApplyButton="false" styleClass="span11" cellWidth="24px" cellHeight="31px" converterMessage="Use MMDDYYYY format">
		<rich:placeholder value="MMDDYYYY" />
	</rich:calendar>
	<span class="help-inline"><rich:message for="dob" /></span>
</h:panelGroup>
{code}

The submit button was:
{code}
<a4j:commandButton type="submit" styleClass="controls btn btn-primary" value="Search" id="searchButton" execute="@form" render=":searchResutPanel" action="#{managedBean.search}" />
{code}

The placeholder text did display and disappear if I put the cursor in the box.  However, after clicking the command button, the <rich:message> displayed the converterMessage of "Use MMDDYYYY format".  It did not automatically clear the placeholder text or ignore it on submit.
                
      was (Author: JustinKSU):
    {code}
Lukáš,

  I tried using the placeholder component in the following manner with the latest 4.3.0-SNAPSHOT

{code}
<h:panelGroup layout="block" styleClass="controls">
	<rich:calendar enableManualInput="true" value="#{managedBean.dob}" id="dob" locale="US" popup="true" datePattern="MMddyyyy" showApplyButton="false" styleClass="span11" cellWidth="24px" cellHeight="31px" converterMessage="Use MMDDYYYY format">
		<rich:placeholder value="MMDDYYYY" />
	</rich:calendar>
	<span class="help-inline"><rich:message for="dob" /></span>
</h:panelGroup>
{code}

The submit button was:
{code}
<a4j:commandButton type="submit" styleClass="controls btn btn-primary" value="Search" id="searchButton" execute="@form" render=":searchResutPanel" action="#{managedBean.search}" />
{code}

The placeholder text did display and disappear if I put the cursor in the box.  However, after clicking the command button, the <rich:message> displayed the converterMessage of "Use MMDDYYYY format".  It did not automatically clear the placeholder text or ignore it on submit.
                  
> rich:calendar defaultLabel causes conversion error if not populated.
> --------------------------------------------------------------------
>
>                 Key: RF-12594
>                 URL: https://issues.jboss.org/browse/RF-12594
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 4.2.2.Final, 4.2.3.Final, 4.3.0.M2
>            Reporter: Justin Rosenberg
>            Assignee: Lukáš Fryč
>
> If the defaultLabel attribute is set for a rich:calendar object and no value is entered, a conversion error occurs.  It seems like the submission is trying to parse the defaultLabel value into a date.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list