Hi all,
I have a weird binding problem. I want to bind an HtmlGmap component to my backing bean.
My page code looks like this:
<rich:panel> <rich:gmap binding="#{googleMapsBinding.map}" mapType="G_NORMAL_MAP" gmapVar="_map" gmapKey="ABQIAAAAbHnR2PtFer2KlA48Z0skqBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTDRxKRsg12uu50ETM4gFqD5UPusA" oninit="drawDistrict(_map)" id="map"> </rich:gmap> </rich:panel>
I bind it to an event scope component:
@Name("googleMapsBinding") @Scope(ScopeType.EVENT) public class GoogleMapsBinding implements Serializable { private static final long serialVersionUID = 6073074679639877962L; /** * This class is in EVENT scope * and injected in the MapsAction which is in conversation scope. * You can't bind a conversational class. On a postback request, * component bindings are updated during the Restore View phase, * before the Seam conversation context has been restored. * */ private HtmlGmap map; public HtmlGmap getMap() { return map; } public void setMap(HtmlGmap map) { this.map = map; } }
This component is injected into my MapAction which is in conversation scope.
When I load my page I get an:
12:07:38,531 ERROR [viewhandler] Error Rendering View[/mapAdmin.xhtml]
javax.faces.FacesException: javax.el.ELException: /mapAdmin.xhtml @116,15 binding="#{googleMapsBinding.map}": java.lang.IllegalArgumentException: argument type mismatch
What am I doing wrong?