Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF Calendar and org.apache.myfaces.trinidadinternal.convert.TypeConversionException

rade.todorovichOct 23 2015 — edited Oct 25 2015

JDeveloper 12.1.3

Sometimes I feel that I experience a setback as soon as I try to do anything more complex than "hello world' in ADF.

This time I am trying to implement adf calendar and show 'time' in activityHover facet (using af:noteWindow)

The issue I am facing can be reproduced in any available demo, so I will use this one:

http://www.gebs.ro/blog/oracle/oracle-adf-calendar-step-by-step-implementation/

So either in EO or VO I want to set my own date/time format, so that in activityHover facet I can display both date and time:

          \<f:facet name="activityHover">

            \<af:popup id="p6" contentDelivery="lazyUncached">

              \<af:noteWindow id="nw1">

                \<af:panelFormLayout id="pfl2">

                  \<af:panelLabelAndMessage label="#{bindings.Id.hints.label}:"

                                           id="plam2">

                    \<af:outputText value="#{bindings.Id.inputValue}"

                                   id="ot4"/>

                  \</af:panelLabelAndMessage>

                  \<af:panelLabelAndMessage label="#{bindings.StartDate.hints.label}:"

                                           id="plam3">

                    \<af:outputText value="#{bindings.StartDate.inputValue}"

                                   id="ot2">

                      \<af:convertDateTime pattern="#{bindings.StartDate.format}"

                                          type="both"/>

                    \</af:outputText>

For the purpose of this test, let's just say I changed to format to default: yyyy-MM-dd Simple Date

issue10232015_1.jpg

Assuming that there are some calendar events in the DB, upon running the app, the error shows:

org.apache.myfaces.trinidadinternal.convert.TypeConversionException: Could not convert instance:2015-10-23 of type:class java.lang.String into type:class java.util.Date

at org.apache.myfaces.trinidadinternal.convert.GenericConverterFactory.convert(GenericConverterFactory.java:289)

at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding.getAsDate(FacesCtrlCalendarBinding.java:194)

at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$AdfmCalendarActivity.getStartDate(FacesCtrlCalendarBinding.java:1076)

at oracle.adf.view.rich.model.CalendarModel.isActivityInRange(CalendarModel.java:213)

....

There is no error if no format type is used.

Is this a bug? Or ADF calendar can only work with default VO date settings?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2015
Added on Oct 23 2015
2 comments
659 views