Trouble using Server-side Map EventListeners

18 views
Skip to first unread message

Ned

unread,
Nov 18, 2014, 2:16:38 PM11/18/14
to gmaps4...@googlegroups.com
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.

Hazem Saleh

unread,
Nov 18, 2014, 8:08:49 PM11/18/14
to gmaps4jsf-dev

--
You received this message because you are subscribed to the Google Groups "gmaps4jsf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmaps4jsf-de...@googlegroups.com.
To post to this group, send email to gmaps4...@googlegroups.com.
Visit this group at http://groups.google.com/group/gmaps4jsf-dev.
For more options, visit https://groups.google.com/d/optout.



--
Hazem Saleh

Author of "JavaScript Mobile Application Development" book:

Ned

unread,
Nov 19, 2014, 10:31:56 AM11/19/14
to gmaps4...@googlegroups.com, haz...@apache.org
Thank you.
Reply all
Reply to author
Forward
0 new messages