Hi,
I'm using an ImageMap to display an image. Whenever a user clicks on the
image, the coordinates get sent to the Server using AJAX. There, I want to
add a CircleLink to the place where the user clicked. So I'm trying to
replace the whole map using:
protected void onEvent(AjaxRequestTarget target) {
WebRequest request = (WebRequest) getRequest();
final Map<String, String[]> parameters =
request.getParameterMap();
final int x = Integer.parseInt(parameters.get("x")[0]);
final int y = Integer.parseInt(parameters.get("y")[0]);
imageMap.addCircleLink(x, y, 10, new Link("testLink") {
@Override
public void onClick() {
// TODO Auto-generated method
stub
}
});
target.addComponent(imageMap);
PicMapPanel.this.processResult(x, y, target);
}
My problem now is that the imageMap can't be replaced. AJAX debug says
"ERROR: Component with id [[theMap2]] a was not found while trying to
perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update."
And yes, I'm sure I called it, but it can't be found in the markup.
Does anyone have an idea how to solve this? Maybe in a completely different
way, I wouldn't mind that ;-)
Michael
--
View this message in context:
http://www.nabble.com/ImageMap-and-Ajax-tf4633435.html#a13230846
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]