It's clearly the AjaxFormValidatingBehavior.addToAllFormComponents(this,
"onblur", wicket.util.time.Duration.seconds(2)).  Without that everything
works as expected.  We'll just comment that out for out demo.  Here's the
code & the stack trace.


   public RoomRequestForm(String id, IModel model,
HotelAvailabilityResultsPanel rPanel)
   {
       super(id, model);
       setRoomRequest((RoomRequest) getModelObject());
       setOutputMarkupId(true);
       resultsPanel = rPanel;

       FeedbackPanel feedback = new FeedbackPanel("feedback");
       add(feedback);
       feedback.setOutputMarkupId(true);

       DateTextField checkIn = new DateTextField("checkIn", new
PropertyModel(roomRequest, "checkIn"));
       checkIn.setOutputMarkupId(true);
        checkIn.setRequired(true);
       // checkIn.add(DateValidator.minimum(getToday()));
       add(checkIn);

       DatePicker dp = new CylleniusCalendar("checkInPicker", checkIn);
       add(dp);

       final FormComponentFeedbackBorder checkInBorder =
addWithBorder(checkIn, "checkInBorder");
       add(checkInBorder);
       addAjaxBehaviorToComponent(checkIn, checkInBorder, feedback);

       DateTextField checkOut = new DateTextField("checkOut", new
PropertyModel(roomRequest,
               "checkOut"));
       checkOut.setOutputMarkupId(true);
       // checkIn.setRequired(true);
       add(checkOut);

       DatePicker dp2 = new CylleniusCalendar("checkOutPicker", checkOut);
       add(dp2);

       final FormComponentFeedbackBorder checkOutBorder =
addWithBorder(checkOut, "checkOutBorder");
       add(checkOutBorder);
       addAjaxBehaviorToComponent(checkOut, checkOutBorder, feedback);

//         DatesComparatorValidator validator = new
//         DatesComparatorValidator(checkIn, checkOut);
//         add(validator);

       addRoomChoice();
       addAdultChildrenChoice();
       AjaxFormValidatingBehavior.addToAllFormComponents(this, "onblur",
wicket.util.time.Duration.sec
               .seconds(2));
   }



2/02 10:02:58 INFO | Server.doStart(475): JBoss (MX MicroKernel)
[4.0.3SP1(build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in
32s:378ms
2/02 10:03:53 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
file:/C:/dev/uiproto/wicketapp/content/com/vegas/cart/wicket/components/ProductPanel.properties
2/02 10:03:58 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
file:/C:/dev/jboss/server/concierge/deploy/wicketapp.war/WEB-INF/classes/com/vegas/cart/wicket/CartApplication.properties
2/02 10:03:58 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
jar:file:/C:/dev/jboss/server/concierge/deploy/wicketapp.war/WEB-INF/lib/wicket-
1.2.4.jar!/wicket/Application.properties
2/02 10:04:50 ERROR| AjaxRequestTarget.respond(379): Error while responding
to an AJAX request: [EMAIL PROTECTED] markupIdToComponent
[{scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_checkOutBorder=[MarkupContainer
[Component id = checkOutBorder, page = com.vegas.cart.wicket.pages.Index,
path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
checkOutBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_feedback=[MarkupContainer
[Component id = feedback, page = com.vegas.cart.wicket.pages.Index, path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
feedback.FeedbackPanel, isVisible = true, isVersioned = false]],
tabsPopup_content_productReservation_inlineRoomRequest_feedback=[MarkupContainer
[Component id = feedback, page = com.vegas.cart.wicket.pages.Index, path =
0:tabsPopup:content:productReservation:inlineRoomRequest:
feedback.FeedbackPanel, isVisible = true, isVersioned = false]],
tabsPopup_content_productReservation_inlineRoomRequest_checkOutBorder=[MarkupContainer
[Component id = checkOutBorder, page = com.vegas.cart.wicket.pages.Index,
path = 0:tabsPopup:content:productReservation:inlineRoomRequest:
checkOutBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
tabsPopup_content_productReservation_inlineRoomRequest_checkInBorder=[MarkupContainer
[Component id = checkInBorder, page = com.vegas.cart.wicket.pages.Index,
path = 0:tabsPopup:content:productReservation:inlineRoomRequest:
checkInBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_checkInBorder=[MarkupContainer
[Component id = checkInBorder, page = com.vegas.cart.wicket.pages.Index,
path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
checkInBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]]}], prependJavascript [[]], appendJavascript [[]]
wicket.WicketRuntimeException: Exception in rendering component:
[MarkupContainer [Component id = feedbackul, page =
com.vegas.cart.wicket.pages.Index, path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:feedback:
feedbackul.FeedbackPanel$2, isVisible = true, isVersioned = false]]
   at wicket.Component.renderComponent(Component.java:1746)
   at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
   at wicket.Component.render(Component.java:1533)
   at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
   at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java
:982)
   at wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java
:571)
   at wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:108)
   at wicket.Component.renderComponent(Component.java:1719)
   at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
   at wicket.Component.render(Component.java:1533)
   at wicket.Component.renderComponent(Component.java:1657)
   at wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java
:474)
   at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:361)
   at wicket.request.compound.DefaultResponseStrategy.respond(
DefaultResponseStrategy.java:49)
   at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond
(AbstractCompoundRequestCycleProcessor.java:66)
   at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902)
   at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:934)
   at wicket.RequestCycle.step(RequestCycle.java:1010)
   at wicket.RequestCycle.steps(RequestCycle.java:1084)
   at wicket.RequestCycle.request(RequestCycle.java:454)
   at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
   at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
ReplyHeaderFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(
CustomPrincipalValve.java:39)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
SecurityAssociationValve.java:159)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(
JaccContextValve.java:59)
   at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
   at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
   at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
   at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:678)
   at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
   at wicket.markup.html.list.ListView.renderItem(ListView.java:680)
   at wicket.markup.html.list.ListView.onRender(ListView.java:641)
   at wicket.Component.render(Component.java:1533)
   at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
   at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java
:982)
   at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
   at wicket.Component.renderComponent(Component.java:1719)
   ... 44 more

On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

Give us a stacktrace if you have it.

Eelco

On 2/2/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> The text field has yy, while the date picker puts yyyy into the date --
> whether it's MM/dd/yyyy or dd/MM/yyyy (due to i18n).  Then we get an
> annoying npe rendering the feedback panel -- which I still haven't
tracked
> down.
>
> popup contains panel
> panel contains form
> form contains fields with validation
> form contains date pickers that are tied to two of the fields
> form also has form-level validation
> form also contains feedback panel with form component feedback borders
> around date fields
> form applies
> AjaxFormValidatingBehavior.addToAllFormComponents("onblur")
>
> When the date picker pushes an invalid date (check-in date before today
or
> check-out date on/before check-in date) null pointers just roll in
rendering
> the feedback panel.  I'm working to isolate this to a simpler case...
>
> Scott
>
>
>
> On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > The date picker component already tries to sync with the text field
> > you provide as the target. Did you try this?
> >
> > Eelco
> >
> >
> > On 2/1/07, Scott Swank <[EMAIL PROTECTED] > wrote:
> > > I just (a bit too optimistically) tried to get the converter from my
> > > TextField and use it to set the DateConverter for the corresponding
> > > DatePicker.  I definitely want to retain the i18n (mm/dd/yyyy for
> ENGLISH
> > > and dd/mm/yyyy for FRENCH).  Is there a straightforward way to synch
up
> the
> > > DateConverters for a TextField and DatePicker while retaining
> > > internationalization?
> > >
> > >         RequiredTextField checkIn = new RequiredTextField("checkIn",
new
> > > PropertyModel(roomRequest,
> > >                 "checkIn"), Date.class);
> > >         checkIn.setOutputMarkupId(true);
> > >         checkIn.add(DateValidator.minimum(getToday()));
> > >         add(checkIn);
> > >
> > >         DatePicker dp = new
> > > CylleniusCalendar("checkInPicker", checkIn);
> > >         dp.setOutputMarkupId(true);
> > >         dp.setDateConverter ((DateConverter) checkIn.getConverter());
> > >         add(dp);
> > >
> > >  java.lang.ClassCastException: wicket.util.convert.Converter
> > >     at
> > >
> com.vegas.cart.wicket.components.RoomRequestForm.<init>(
RoomRequestForm.java
> > > :69)
> > >
> > > Thank you,
> > > Scott
> > >
>
-------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your
job
> > > easier.
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
>
-------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier.
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> --
>  Scott Swank
> reformed mathematician
>
-------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Scott Swank
reformed mathematician
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to