Joseph,
you change is wrong. You did
add(new MyBorder("border")); // Made MyBorder public
// add the clock component
Clock clock = new Clock("clock",
TimeZone.getTimeZone("America/Los_Angeles"));
add(clock);
but you must add the clock to the border like
Border myBorder = new MyBorder("border";
add(myBorder);
Clock clock = new Clock("clock",
TimeZone.getTimeZone("America/Los_Angeles"));
border.add(clock);
Juergen
---------- Forwarded message ----------
From: SourceForge.net <[EMAIL PROTECTED]>
Date: Mar 7, 2006 5:55 PM
Subject: [ wicket-Bugs-1442757 ] Ajax errors in a Border
To: [EMAIL PROTECTED]
Bugs item #1442757, was opened at 2006-03-03 17:10
Message generated for change (Comment added) made by weazelb0y
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1442757&group_id=119783
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Joseph Toth (weazelb0y)
Assigned to: Juergen Donnerstag (jdonnerstag)
Summary: Ajax errors in a Border
Initial Comment:
If you wrap the Clock example in a Border you get the
following error.
SEVERE: wicket.ajax.AjaxRequestTarget$EncodingResponse
java.lang.ClassCastException
Mar 3, 2006 5:00:38 PM wicket.RequestCycle step
SEVERE: Unable to determine markup for component:
[Component id = clock, page =
wicket.examples.ajax.builtin.ClockPage, path =
1:clock.Clock, isVisible = true, isVersioned = true]
wicket.WicketRuntimeException: Unable to determine
markup for component: [Component id = clock, page =
wicket.examples.ajax.builtin.ClockPage, path =
1:clock.Clock, isVisible = true, isVersioned = true]
at
wicket.Component.initializeMarkupStream(Component.java:2839)
at wicket.Component.doRender(Component.java:709)
at
wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:217)
at
wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:144)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:47)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:824)
at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:851)
at wicket.RequestCycle.step(RequestCycle.java:931)
at wicket.RequestCycle.steps(RequestCycle.java:1005)
at wicket.RequestCycle.request(RequestCycle.java:451)
at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at
org.mortbay.http.HttpServer.service(HttpServer.java:909)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Mar 3, 2006 5:00:38 PM
wicket.util.resource.UrlResourceStream <init>
INFO: cannot convert url:
jar:file:/home/jtoth/workspace-test/k/lib/wicket-1.2-SNAPSHOT.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
to file (URI is not hierarchical), falling back to the
inputstream for polling
Mar 3, 2006 5:00:38 PM wicket.markup.MarkupCache
loadMarkupAndWatchForChanges
INFO: Loading markup from
jar:file:/home/jtoth/workspace-test/k/lib/wicket-1.2-SNAPSHOT.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
Mar 3, 2006 5:00:38 PM wicket.RequestCycle step
SEVERE: wicket.ajax.AjaxRequestTarget$EncodingResponse
java.lang.ClassCastException:
wicket.ajax.AjaxRequestTarget$EncodingResponse
at
wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:99)
at
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:130)
at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:47)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at wicket.RequestCycle.respond(RequestCycle.java:877)
at wicket.RequestCycle.step(RequestCycle.java:946)
at wicket.RequestCycle.steps(RequestCycle.java:1005)
at wicket.RequestCycle.request(RequestCycle.java:451)
at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at
org.mortbay.http.HttpServer.service(HttpServer.java:909)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
17:00:38.431 WARN!! [SocketListener0-49]
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:589)
>11>
/ajax?wicket:interface=:1:clock:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&random=0.49850258786616486:
wicket.WicketRuntimeException: Internal Error: Could
not render error page class
wicket.markup.html.pages.InternalErrorPage
at
wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:97)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)
at wicket.RequestCycle.step(RequestCycle.java:971)
at wicket.RequestCycle.steps(RequestCycle.java:1005)
at wicket.RequestCycle.request(RequestCycle.java:451)
at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at
org.mortbay.http.HttpServer.service(HttpServer.java:909)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: java.lang.ClassCastException:
wicket.ajax.AjaxRequestTarget$EncodingResponse
at
wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:99)
at
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:130)
at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:47)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at wicket.RequestCycle.respond(RequestCycle.java:877)
at wicket.RequestCycle.step(RequestCycle.java:946)
... 18 more
----------------------------------------------------------------------
>Comment By: Joseph Toth (weazelb0y)
Date: 2006-03-07 11:55
Message:
Logged In: YES
user_id=447234
Not getting the exception now, but still having a problem.
Just got the latest from Anon CVS and modified ClockPage to
the following below. Now, the update does not happen, no
exception occurs and I can't go back to the page if I click
off of it. Looks like some kind of dead lock or infinite loop.
Thanks
public ClockPage()
{
add(new MyBorder("border")); // Made MyBorder public
// add the clock component
Clock clock = new Clock("clock",
TimeZone.getTimeZone("America/Los_Angeles"));
add(clock);
// add the ajax behavior which will keep updating the
component every 5
// seconds
clock.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
}
<wicket:extend>
<span wicket:id="border">
This example demonstrates a AjaxSelfUpdatingBehavior.
This behavior can be attached to any component to make it
update itself every x number of milliseconds.
The clock below is updated every five seconds.
<br/><br/>
The server time now is: <span wicket:id="clock">[clock]</span>
</span>
</wicket:extend>
----------------------------------------------------------------------
Comment By: Juergen Donnerstag (jdonnerstag)
Date: 2006-03-04 03:28
Message:
Logged In: YES
user_id=544015
fixed
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1442757&group_id=119783
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user