4 Replies Latest reply on May 4, 2010 10:27 AM by Ilya Shaikovsky

    Binding HtmlGmap java.lang.IllegalArgumentException: argument type mismatch

    Derk Dukker Novice

      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:

       

       

       

      {code:xml}<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>{code}

       

      I bind it to an event scope component:

       

       

       

      {code}
      @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;
          }

       

       

       

      }{code}

       


      This component is injected into my MapAction which is in conversation scope.

       

      When I load my page I get an:

       

      {quote}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{quote}

       

      What am I doing wrong?

       

      I'm using Seam 2.2.0 and richfaces 3.3.3.final!