This problem occurs only in very specific environments when handling map_click
events:
java.lang.RuntimeException: Could not convert variable "x" for
org.vaadin.vol.OpenLayersMap (PID116)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.decodeVariable(AbstractCommunicationManager.java:1578)
This happens only in a portlet environment (Liferay 6.0 and most recent 6.1.1
GA2) with Firefox browser. Neither Chrome nor IE have this problem. And none
of these browsers exhibit the problem in servlet environments (Tomcat, Jetty).
What's happening is that with the Firefox browser the Pixel wrapper object is
getting loaded with a floating point value (always ending in .5, so sounds
buggy) for the x coordinate when VOpenLayersMap is handling the map_click
event. This causes the exception as the value is getting passed server-side.
Even though the problem occurs in a very specific environment, it does expose
an assumption in the Pixel wrapper that the underlying javascript number
objects for x and y will always be integral values. The attached fix replaces
that assumption with an assurance that Pixel's x and y getters always return
integral values from the underlying javascript number objects.
John Ryan
Original issue reported on code.google.com by jr...@redzonesoftware.com on 2 Mar 2013 at 7:48
Original issue reported on code.google.com by
jr...@redzonesoftware.com
on 2 Mar 2013 at 7:48Attachments: