Re: [Wicket-user] GMarkerManager in GMap wicket lib?
Hi, Just continuing from this thread. I'm currently helping [EMAIL PROTECTED] to get their *secret* project going. I svn co the gmap contrib with version 1712 and try to migrate their existing code to use wicket-2.0 and pax-wicket-2.0. During migration I noticed a couple of bug in gmap migration to wicket-2.0: * In the gmap-examples, in the constructor of HomePage() the label is instantiated with parent as HomePage. the info panel is instantiated with parent as HomePage. The homepage does not have INFO_COMPONENT_ID wicket id. The fix is rather long, instead of passing component to marker, I decided to pass the component factory. This way, we can delay the instantiation of the label/info panel as late as possible, and also, there is no hardcoding involve on the user of gmap to ensure the wicket id of the component is INFO_COMPONENT_ID. ComponentFactory interface is added with the following signature. code public interface ComponentFactoryT extends Component extends Serializable { V extends MarkupContainer T createComponent(V parent, String wicketId); } /code - Update GMarker constructor to accept ComponentFactory instead of Component. - Update GMarker#getComponent() method to use ComponentFactory. The method signature becomes Gmarker#getComponent( MarkupContainer parent, String wicketId ) - Update GMarkerContainer constructor to use GMarker#getComponent( MarkupContainer, String ) and remove static checking that the component id must be INFO_COMPONENT_ID. * Fix up InfoPanel at populateItem( final ListItemDeveloper item). the labels are added to (this), where it should be added to (item). * For some odd reason that only one marker can be clicked at the beginning, after that NullPointerException is thrown. stacktrace SEVERE: Error while responding to an AJAX request: [EMAIL PROTECTED] markupIdToComponent [{1787073357512=[MarkupContainer [Component id = gmarkerContainer, page = wicket.contrib.examples.gmap.HomePage, path = 0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer.GMarkerContainer, isVisible = true, isVersioned = true]]}], prependJavascript [[]], appendJavascript [[]] wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = gmarkerInfo, page = wicket.contrib.examples.gmap.HomePage, path = 0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer:gmarkerInfo .InfoPanel, isVisible = true, isVersioned = true]] at wicket.MarkupContainer.attachChildren(MarkupContainer.java:383) at wicket.Component.attach(Component.java:2784) at wicket.MarkupContainer.attachChildren(MarkupContainer.java:372) at wicket.Component.attach(Component.java:2784) at wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:448) at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:339) at wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:53) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.j ava:65) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:944) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:978) at wicket.RequestCycle.step(RequestCycle.java:1054) at wicket.RequestCycle.steps(RequestCycle.java:1125) at wicket.RequestCycle.request(RequestCycle.java:470) at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) at
Re: [Wicket-user] GMarkerManager in GMap wicket lib?
Edward, Thanks for the patch and hard work, i'll apply the patch right away. As far as I see the root problem is in the way gmap 1.0 is designed; it doenst really fit with wicket 2.0 model where we haveto pass the parent as contructor argument. as you said, porting and issues that appear might be long, an overkill and we have to do all kind of workarounds to fit it. my initial thinking was to redesign gmap for wicket 2.0, i put some ideas on paper but nothing concrete yet. but still till that time i'll apply your patch and see how it goes. keep in touch. /iulian On 1/31/07, Edward Yakop [EMAIL PROTECTED] wrote: Hi, Just continuing from this thread. I'm currently helping [EMAIL PROTECTED] to get their *secret* project going. I svn co the gmap contrib with version 1712 and try to migrate their existing code to use wicket-2.0 and pax-wicket-2.0. During migration I noticed a couple of bug in gmap migration to wicket-2.0 : * In the gmap-examples, in the constructor of HomePage() the label is instantiated with parent as HomePage. the info panel is instantiated with parent as HomePage. The homepage does not have INFO_COMPONENT_ID wicket id. The fix is rather long, instead of passing component to marker, I decided to pass the component factory. This way, we can delay the instantiation of the label/info panel as late as possible, and also, there is no hardcoding involve on the user of gmap to ensure the wicket id of the component is INFO_COMPONENT_ID. ComponentFactory interface is added with the following signature. code public interface ComponentFactoryT extends Component extends Serializable { V extends MarkupContainer T createComponent(V parent, String wicketId); } /code - Update GMarker constructor to accept ComponentFactory instead of Component. - Update GMarker#getComponent() method to use ComponentFactory. The method signature becomes Gmarker#getComponent( MarkupContainer parent, String wicketId ) - Update GMarkerContainer constructor to use GMarker#getComponent( MarkupContainer, String ) and remove static checking that the component id must be INFO_COMPONENT_ID. * Fix up InfoPanel at populateItem( final ListItemDeveloper item). the labels are added to (this), where it should be added to (item). * For some odd reason that only one marker can be clicked at the beginning, after that NullPointerException is thrown. stacktrace SEVERE: Error while responding to an AJAX request: [EMAIL PROTECTED] markupIdToComponent [{1787073357512=[MarkupContainer [Component id = gmarkerContainer, page = wicket.contrib.examples.gmap.HomePage, path = 0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer.GMarkerContainer, isVisible = true, isVersioned = true]]}], prependJavascript [[]], appendJavascript [[]] wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = gmarkerInfo, page = wicket.contrib.examples.gmap.HomePage, path = 0:gmap:gmapContainer:gmarkersLoop:1:gmarkerContainer:gmarkerInfo .InfoPanel, isVisible = true, isVersioned = true]] at wicket.MarkupContainer.attachChildren(MarkupContainer.java:383) at wicket.Component.attach(Component.java:2784) at wicket.MarkupContainer.attachChildren(MarkupContainer.java:372) at wicket.Component.attach(Component.java:2784) at wicket.ajax.AjaxRequestTarget.respondComponents( AjaxRequestTarget.java:448) at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java :339) at wicket.request.compound.DefaultResponseStrategy.respond( DefaultResponseStrategy.java:53) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond( AbstractCompoundRequestCycleProcessor.j ava:65) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java :944) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java :978) at wicket.RequestCycle.step(RequestCycle.java:1054) at wicket.RequestCycle.steps(RequestCycle.java:1125) at wicket.RequestCycle.request(RequestCycle.java:470) at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java :138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle( ServletHolder.java:491) at org.mortbay.jetty.servlet.ServletHandler.handle( ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:185) at org.mortbay.jetty.servlet.SessionHandler.handle( SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle( ContextHandler.java:689) at org.mortbay.jetty.webapp.WebAppContext.handle( WebAppContext.java:391) at org.mortbay.jetty.handler.ContextHandlerCollection.handle( ContextHandlerCollection.java:146) at
Re: [Wicket-user] GMarkerManager in GMap wicket lib?
hey, till now there were not much interest for this library; no further plans so far. but if people are interested i can put some effort into it and add new features. let's see how feasible it is and how it goes. /iulian On 1/29/07, Peter Neubauer [EMAIL PROTECTED] wrote: Hi there, we are playing around with the Gmap wicket extension and would like to move markers. Is there any plan to implement the GMarkerManager and GMarkerManagerOptions in order to achive that? Cheers /peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] GMarkerManager in GMap wicket lib?
Mmh, yes we would be interested. We have tried GWT for some stuff but the resulting code looks not very nice and having everything on the client is not that cool either, so gut feeling that wicket fits best. It seems that the Gmap API is quite clean and lean, and your integration looks great, too. So I think it should not be a big problem. But myself I am not capable of doing that, have never tried JavaScript and no time at my hands right now. If you sit tight, maybe we can get someone over here to look into this? /peter On 1/29/07, Iulian Costan [EMAIL PROTECTED] wrote: hey, till now there were not much interest for this library; no further plans so far. but if people are interested i can put some effort into it and add new features. let's see how feasible it is and how it goes. /iulian On 1/29/07, Peter Neubauer [EMAIL PROTECTED] wrote: Hi there, we are playing around with the Gmap wicket extension and would like to move markers. Is there any plan to implement the GMarkerManager and GMarkerManagerOptions in order to achive that? Cheers /peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] GMarkerManager in GMap wicket lib?
Hi Peter, the big thing is that the existing gmap code needs to be refactored a bit in order to be able to easily integrate new features. right now it is quite complex and ulgy to implement new/more advanced features. i have to spend some time to find a nice way to do it, after that i hope to be a piece of cake to do it. and of course if you want to put your hands on not so friendly javascript, any help is welcome. anyway, keep in touch. /iulian On 1/29/07, Peter Neubauer [EMAIL PROTECTED] wrote: Mmh, yes we would be interested. We have tried GWT for some stuff but the resulting code looks not very nice and having everything on the client is not that cool either, so gut feeling that wicket fits best. It seems that the Gmap API is quite clean and lean, and your integration looks great, too. So I think it should not be a big problem. But myself I am not capable of doing that, have never tried JavaScript and no time at my hands right now. If you sit tight, maybe we can get someone over here to look into this? /peter On 1/29/07, Iulian Costan [EMAIL PROTECTED] wrote: hey, till now there were not much interest for this library; no further plans so far. but if people are interested i can put some effort into it and add new features. let's see how feasible it is and how it goes. /iulian On 1/29/07, Peter Neubauer [EMAIL PROTECTED] wrote: Hi there, we are playing around with the Gmap wicket extension and would like to move markers. Is there any plan to implement the GMarkerManager and GMarkerManagerOptions in order to achive that? Cheers /peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user