you werent kidding about 3 hours of sleep... -igor
On Fri, Apr 4, 2008 at 12:57 AM, Gerolf Seitz <[EMAIL PROTECTED]> wrote: > you don't have joda-time in your classpath. > Gerolf > > On Fri, Apr 4, 2008 at 9:55 AM, lienok > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>> > wrote: > > > > > > > Hello, > > > > I am following book Enjoying web development with wicket, using Wicket > > 1.3.2. > > Everythink worked fine till I added form.add(quoteDate). > > Please check code and stack trace below and let me know any advice. > > Thank you > > > > public class GetQuoteSymbol extends WebPage { > > private Model model; > > > > private Model dateModel; > > > > public GetQuoteSymbol() { > > FeedbackPanel feedback = new FeedbackPanel("msgs"); > > add(feedback); > > Form form = new Form("f") { > > protected void onSubmit() { > > String sym = (String) model.getObject(); > > Date date = (Date) dateModel.getObject(); > > int stockValue = (sym + > > date.toString()).hashCode() % 100; > > QuoteResult quoteResult = new > > QuoteResult(stockValue); > > setResponsePage(quoteResult); > > } > > }; > > model = new Model(); > > List symbols = new ArrayList(); > > symbols.add("MSFT"); > > symbols.add("IBM"); > > symbols.add("RHAT"); > > DropDownChoice symbol = new DropDownChoice("sym", model, > > symbols); > > symbol.setRequired(true); > > form.add(symbol); > > dateModel = new Model(); > > TextField quoteDate = new TextField("quoteDate", dateModel, > > Date.class); > > quoteDate.setRequired(true); > > quoteDate.add(new DatePicker()); > > > > //HERE IS A PROBLEM > > form.add(quoteDate); > > > > add(form); > > } > > } > > > > stack trace: > > WicketMessage: Can't instantiate page using constructor public > > com.myapp.stockquote.GetQuoteSymbol() > > > > Root cause: > > > > java.lang.ClassNotFoundException: org.joda.time.DateTime > > at > > > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) > > at > > > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > at java.lang.Class.forName0(Native Method) > > at java.lang.Class.forName(Class.java:169) > > at > > > > > org.apache.wicket.extensions.yui.calendar.DatePicker.class$(DatePicker.java:86) > > at > > > > > org.apache.wicket.extensions.yui.calendar.DatePicker.getDatePattern(DatePicker.java:438) > > at > > > > > org.apache.wicket.extensions.yui.calendar.DatePicker.checkComponentProvidesDateFormat(DatePicker.java:296) > > at > > > > > org.apache.wicket.extensions.yui.calendar.DatePicker.bind(DatePicker.java:129) > > at org.apache.wicket.Component.add(Component.java:922) > > at com.myapp.stockquote.GetQuoteSymbol.<init>(GetQuoteSymbol.java:57) > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > at > > > > > org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149) > > at > > > > > org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) > > at > > > > > org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262) > > at > > > > > org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) > > at > > > > > org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) > > at > > > > > org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) > > at > > > > > org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166) > > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) > > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) > > at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) > > at > > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358) > > at > > > > org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > > at > > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > > at > > > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) > > at > > > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > > at > > > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > > at > > > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > > at > > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > > at > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) > > at > > > > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) > > at > > > > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) > > at > > > > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) > > at > > > > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > > at java.lang.Thread.run(Thread.java:619) > > -- > > View this message in context: > > http://www.nabble.com/DataPicker-problem-tp16487490p16487490.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]