You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Brendan Conner (JIRA)" <my...@incubator.apache.org> on 2005/07/08 23:37:10 UTC
[jira] Created: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
inputCalendar gets Conversion Error when <h:commandButton> is in the same form
------------------------------------------------------------------------------
Key: MYFACES-317
URL: http://issues.apache.org/jira/browse/MYFACES-317
Project: MyFaces
Type: Bug
Versions: 1.0.9 beta
Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
Reporter: Brendan Conner
If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
Here's an example snippet from a JSP that produces this error:
<h:form>
<x:inputCalendar value="#{calendar.date}"
monthYearRowClass="yearMonthHeader"
weekRowClass="weekHeader"
dayCellClass="dayCell"
currentDayCellClass="currentDayCell"
<h:inputText value="#{actionBean.input}"></h:inputText>
<h:commandButton value="Submit" action="#{actionBean.action}"/>
</h:form>
<h:messages layout="table" />
- Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Brendan Conner (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12315395 ]
Brendan Conner commented on MYFACES-317:
----------------------------------------
The backing bean code is exactly the same as the backing bean given in the example code in the examples distriibution.
I was using the 1.0.9 version given at http://myfaces.apache.org/binary.cgi (inside myfaces.jar). I'll try to educate myself on using SVN and try it with the latest release.
- Brendan
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12315383 ]
Bruno Aranda commented on MYFACES-317:
--------------------------------------
I cannot reproduce this issue using tomcat 5.5.9. Brendan, can you try this with the latest svn? Could you post a snippet of your backing bean code?
Bruno
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12315385 ]
Martin Marinschek commented on MYFACES-317:
-------------------------------------------
I just checked the code for that - it seems perfectly alright, if a value of null is delivered to the converter, it will just be passed on.
In the simple webapp, it works as well, so obviously no chance to reproduce that.
Martin
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Brendan Conner (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12316048 ]
Brendan Conner commented on MYFACES-317:
----------------------------------------
I still can't get the calendar to work right when I have other fields on the page:
1. If I specify the calendar component in its own form, then, when I select different dates on the calendar, the values in the other fields disappear (because they are on a different form).
2. If I specify the calendar component and the other fields all on the same form, then the values on the the other fields are OK (i.e., they maintain their values when I click on other dates in the calendar). However, once I press a "submit" button for the form, the managed bean's Date field specified in the "value" parameter gets reset to null.
I'm using the latest nightly build for this.
- Brendan
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=all ]
Martin Marinschek closed MYFACES-317:
-------------------------------------
Fix Version: Nightly Build
Resolution: Cannot Reproduce
Was not able to reproduce this error by adding a text-field to the form in the simple example section. Both the calendar field and the textfield were correctly set.
Please post a minimal webapp showing this bug and reopen the bug if you still have this problem.
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
> Fix For: Nightly Build
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12316932 ]
Martin Marinschek commented on MYFACES-317:
-------------------------------------------
I just tried that again - using the MyFaces examples, and I don't know where your problem stems from - it works perfectly fine for me.
Can you check out the MyFaces Simple Examples, get them running and tell me what the difference would be to your situation?
Are you using head or 1.0.9?
regards,
Martin
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
> Fix For: Nightly Build
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-317) inputCalendar gets Conversion Error when is in the same form
Posted by "Brendan Conner (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-317?page=comments#action_12315523 ]
Brendan Conner commented on MYFACES-317:
----------------------------------------
OK, I tried the same example with the latest nightly build, and I no longer get that error. However, I get another unexpected result:
If I choose a date and then hit "submit," the backing bean's date gets reset to null. Apparently, the calendar's value is not sent with the "post" when I hit "submit."
- Brendan
> inputCalendar gets Conversion Error when <h:commandButton> is in the same form
> ------------------------------------------------------------------------------
>
> Key: MYFACES-317
> URL: http://issues.apache.org/jira/browse/MYFACES-317
> Project: MyFaces
> Type: Bug
> Versions: 1.0.9 beta
> Environment: Tested on IBM RAD/RAS 6.0; not sure if it's a problem elsewhere
> Reporter: Brendan Conner
> Assignee: Martin Marinschek
>
> If <h:commandButton> is placed in the same form as <x:inputCalendar>, a conversion error occurs after pressing the command button. It happens when HtmlCalendarRenderer.getConvertedValue() is called, because, at that point, submittedValue is null.
> Here's an example snippet from a JSP that produces this error:
> <h:form>
> <x:inputCalendar value="#{calendar.date}"
> monthYearRowClass="yearMonthHeader"
> weekRowClass="weekHeader"
> dayCellClass="dayCell"
> currentDayCellClass="currentDayCell"
> <h:inputText value="#{actionBean.input}"></h:inputText>
> <h:commandButton value="Submit" action="#{actionBean.action}"/>
> </h:form>
> <h:messages layout="table" />
> - Brendan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira