I am getting an error when using VerticalPanel.
Here's the error as reported by Firebug:
c.a is undefined--

I am calling a Java method from Javascript

Here's the GWT code:
public class Caribbeanvisit implements EntryPoint {
  /**
   * This is the entry point method.
   */

  final VerticalPanel siteFriendsPanel = new VerticalPanel();

  public void onModuleLoad() {
    exportAddSiteFriends();

    mainPanel.add(siteFriendsPanel);
  }

  public native void exportAddSiteFriends() /*-{
    $wnd.addSiteFriends =
        
[email protected]::addSiteFriends([Lcom/pavco/caribbeanvisit/client/JsniPerson;);

  }-*/;

  public void addSiteFriends(JsniPerson[] jso) {
    // fyi: JsniPerson extends JavascriptObject
    for (JsniPerson person : jso) {
      final HorizontalPanel hp = new HorizontalPanel();
      final Image thumbnail = new Image(person.getThumbnailUrl());
      final HTML txt = new HTML(person.getDisplayName());
      hp.add(thumbnail);
      hp.add(txt);
      this.siteFriendsPanel.add(hp);  // <--- error happens here
      this.siteFriendsPanel.add(new HTML("TEST"));  // <--- error happens
here also
    }
  }
}

Any ideas?
-Pav

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to