[JBoss JIRA] (RF-12032) rich:calendar : Ajax request - Error message enhancement - sql.Date
by Jean ANDRE (JIRA)
Jean ANDRE created RF-12032:
-------------------------------
Summary: rich:calendar : Ajax request - Error message enhancement - sql.Date
Key: RF-12032
URL: https://issues.jboss.org/browse/RF-12032
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Environment: cssparser-0.9.6 - guava-11.0.1 - hibernate-validator-4.2.0.Final - JSF/Mojarra 2.1.6 - springframework-3.0.6.RELEASE - richfaces-4.2.0.Final - sac-1.3.jar - Windows 7, WAS 8.0.0.1, Servlet 2.5 - Java 6.
Reporter: Jean ANDRE
When a backing-bean have a type of sql.Date which is mapped to a rich:calendar, there is an conversion error due to the rich:calendar component uses util.Date by default. Unfortunately, we do not see any error message at the screen when an ajax request is sent and returned back to us.
What we got, and thanks to Firebug, is the text below as an answer from our Ajax request POST. Nothing is rendered at the screen and the method of the backing bean is not called.
{code}
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><error><error-name>class javax.faces.component.UpdateModelException</error-name><error-message><![CDATA[/pages/client/createClient.xhtml @479,230 value="#{phoneBean.effectiveDate}": Cannot convert 12-03-08 00:00 of type class java.util.Date to class java.sql.Date]]></error-message></error></partial-response>
{code}
Our code looks like this (we remove unecessary field and decoration):
{code}
<a4j:outputPanel id="phone-container" styleClass="panel-command-container" layout="block">
<!-- -->
<!-- ADD PHONE -->
<!-- -->
<h:commandLink id="add-phone"
value="#{msg['common.command.add.phone']}"
action="#{createClientController.doAddPhone}">
<f:ajax render="phone-container" execute="phone-container" />
</h:commandLink>
<c:forEach items="#{createClientController.phoneBeans}" var="phoneBean" varStatus="status">
<h:panelGrid styleClass="header">
<h:outputLabel value="#{msg['create.client.effective.label']}" styleClass="required" />
<h:panelGroup>
<rich:calendar id="effective-#{status.index}"
value="#{phoneBean.effectiveDate}"
popup="true"
showApplyButton="false"
enableManualInput="true"
datePattern="#{msg['client.date.format']}"
inputSize="12"
styleClass="calendar">
<f:ajax event="inputchange" render="@this" />
</rich:calendar>
<h:message id="effective-msg-#{status.index}" for="effective-#{status.index}" styleClass="rf-msg-err" />
</h:panelGroup>
</h:panelGrid>
</c:forEach>
</a4j:outputPanel>
{code}
Is is possible to have a message returned back to the UI??? or is there a way to handle this error properly?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-11833) Label for calendar results in non-valid markup
by Pavol Pitonak (Created) (JIRA)
Label for calendar results in non-valid markup
----------------------------------------------
Key: RF-11833
URL: https://issues.jboss.org/browse/RF-11833
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-input
Affects Versions: 4.1.0.Final
Reporter: Pavol Pitonak
The code in first code snippet results in markup below which is not valid. The for attribute of the label element must refer to a form control, e.g. the actual input inside calendar (that with ID dateForm:fromDateInputDate).
{code:xml}
<h:outputLabel value="From date" for="fromDate" />
<rich:calendar id="fromDate" .../>
{code}
{code:xml}
<label for="dateForm:fromDate">From date</label>
<span class="calendar" id="dateForm:fromDate">
<span id="dateForm:fromDatePopup" style="white-space: nowrap;">
<input class="rf-cal-inp " id="dateForm:fromDateInputDate" name="dateForm:fromDateInputDate" readonly="readonly" style="vertical-align: middle; " type="text" value="Nov 19, 2011" />
...
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months