- Append the loop counter as prefix for the image map area to prevent unique ID exception
This commit is contained in:
Heng Sin Low 2009-11-23 08:10:14 +00:00
parent bca1043d49
commit ccd6ef6ee3
1 changed files with 3 additions and 3 deletions

View File

@ -306,7 +306,7 @@ public class WGraph extends Div implements IdSpace {
area.setCoords(entity.getShapeCoords());
area.setShape(entity.getShapeType());
area.setTooltiptext(entity.getToolTipText());
area.setId("WG_" + key);
area.setId(count+"_WG_" + key);
count++;
}
@ -316,8 +316,8 @@ public class WGraph extends Div implements IdSpace {
String areaId = me.getArea();
if (areaId != null) {
for (int i = 0; i < list.size(); i++) {
String s = "WG_" + list.get(i).getLabel();
if (areaId.equals(s)) {
String s = "_WG_" + list.get(i).getLabel();
if (areaId.endsWith(s)) {
chartMouseClicked(i);
return;
}