I've a probleme in primeface 4. I have a map and I want to see an output panel while clicking on a marked position in the map
<p:gmap model="#{addMarkers.emptyModel}" id="gmap" streetView="false" navigationControl="true" mapTypeControl="true" draggable="true" center="26.959512, -12.821044" zoom="8" type="ROADMAP" style="width:100%;height:500px">
<p:ajax event="overlaySelect" listener="#{addMarkers.onMarkerSelect}" id="open1" update="messages"/>
<p:gmapInfoWindow id="infoWindow">
<p:outputPanel style="text-align: center; margin: auto">
<p:commandButton ajax="true" type="button" value="open map" onclick="PF('dlg').show();" />
When i do refresh the page, the problem seems to be solved and surprisingly I get my output panel ! After debuging I found that I have a little problem in my ManagedBeans
public void onMarkerSelect(OverlaySelectEvent event) {
marker = (Marker) event.getOverlay();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "scanning the materials", "Site :"+ marker.getTitle() ));
}
Before refreshing I'm getting: event overlay type is unknown and the value is NULL After refereshing I'm getting event overlay type is "Marker" and the value is #440
Aucun commentaire:
Enregistrer un commentaire