I am new to gmaps4jsf. I want to get the coordinates of the places where the user clicks on the map.
I have no trouble doing this with client-side event listeners:
<m:eventListener eventName="click" jsFunction="mapClickHandler"/>
However, when I use the "actionListener" and "submitOnClick" attributes for server-side events(as instructed in the examples), the bean method never gets called.
My code looks like this:
<h:form id="form">
<m:map width="500px" height="500px" latitude="24" longitude="15" zoom="2" actionListener="#{mapBean.test}" submitOnClick="true">
</m:map>
</h:form>
In MapBean.java:
public void test(ActionEvent actionEvent) {
System.out.println("Test succeeded.");
}
The test() function gets called if I use the actionListener in a commandButton, so the problem isn't with the bean mapping.
Does anybody have any suggestions?
Thank you.