Super and excellent, whats left for me todo then?:)
regards Nino
Iulian Costan wrote:
take a look in gmap examples as well to see how it works and what
needs to be added to ajax target.
/iulian
On 5/8/07, *Iulian Costan* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
fixed in 1.2 branch, please do an update and you should be able to
add/remove gmarkers via ajax calls. next days i'll be on short
vacation but once i am back in i'll port it to 1.3 as well.
/iulian
On 5/8/07, *Nino Saturnino Martinez Vazquez Wael* <
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
Well it works better. No exception now, the browser receives
the new ajax response but the gmappanel does not render or is
non visible?
After a closer look this part of the ajax response seems strange:
map.addOverlay(createMarker11121872332765());
map.addOverlay(createMarker11121873332765());
map.addOverlay(createMarker11121873332765());
map.addOverlay(createMarker11121873332765());
map.addOverlay(createMarker11121873332765());
map.addOverlay(createMarker11121873332765());
They are all referring to the same method, looks like the idea
are to have separate functions for each marker? And it does
not somehow manage to pickup or create the new methods but
instead it only adds the old one? Found out what caused this,
I added different gmarkers but their location was almost the
same(,0001) difference. We might want to look into this and
generate a more sensible id. But the component still does not
render...
Do you want the quickstart project to take a closer look at?
And yes I am working on 1.2.6, but I could switch to 1.3 beta
if required.
Iulian Costan wrote:
in populateMAP method you create new GMapPanel instance that
gets added to ajax target. there is no need to create new
panel everytime, try to keep only one instance of GMapPanel
that will be re-rendered using ajax. more in ajax handler
method just add new GMarker to existing list like this:
1.
@Override
2.
protected void onUpdate(
AjaxRequestTarget target) {
3.
gmap.getOverlays().add(new GMarker(...));
4. target.
addComponent(gmapPanel);
5.
}
let me know if it works or not, i can take a closer look, as
far as i can see you work on 1.2.* code base right ?
/iulian
On 5/8/07, *Nino Saturnino Martinez Vazquez Wael*
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
wrote:
Hi
Im getting this error when trying to add my updated gmap:
ERROR - RequestCycle - markupId cannot be empty
java.lang.IllegalArgumentException: markupId cannot be empty
at
wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:217)
at
wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:201)
at wicket.quickstart.Index$1.onUpdate(Index.java:75)
at
wicket.ajax.markup.html.form.AjaxCheckBox$1.onUpdate(AjaxCheckBox.java:64)
at
wicket.ajax.form.AjaxFormComponentUpdatingBehavior.onEvent(AjaxFormComponentUpdatingBehavior.java:139)
at
wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:167)
at
wicket.ajax.AbstractDefaultAjaxBehavior.onRequest
(AbstractDefaultAjaxBehavior.java:236)
Please note that I have set outputmarkupid to true.
You can see the java code here:
http://pastebin.ca/476843
but basically its this code it complains about:
protected void onUpdate(AjaxRequestTarget
target) {
GMapPanel populatedMap = populateMap();
if (populatedMap != null) {
target.addComponent(populatedMap);
}
and possibly:
private final GMapPanel populateMap() {
if (filterModel.isDisplayHotel()) {
// add gmarkers here
GPoint center = gmap.getCenter();
int zoomLevel = gmap.getZoomLevel();
gmap = new GMap(center, zoomLevel);
GMarker hotel = new GMarker(new
GPoint(-112.1872f , 33.2765f),
new Label("gmarkerInfo", "Hotel"));
gmap.addOverlay(hotel);
GMapPanel gMapPanel = new GMapPanel("gmap",
gmap, 800, 600,
quickStartGmap_8080_Key);
gMapPanel.setOutputMarkupId(true);
return gMapPanel;
}
return null;
}
regards Nino
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express
and take
control of your XML. No limits. Just data. Click to get
it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
------------------------------------------------------------------------
_______________________________________________
Wicket-user mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
------------------------------------------------------------------------
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user