Found fix.
Making the verticalpanel's static solves it.

On Sun, Jun 21, 2009 at 12:57 AM, Pavel Byles <[email protected]> wrote:

> Just to be clear,
> I'm using GWT1.6, error occurs in FF and Chrome (didn't check any other
> browser yet), and I call addSiteFriends(myJsObj) from javascript in the
> html.
> EntryPoint does contain other stuff... so mainPanel is added to
> RootPanel...
>
>
> On Sat, Jun 20, 2009 at 9:36 PM, Pavel Byles <[email protected]> wrote:
>
>> 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
>>
>
>
>
> --
> -Pavel
>



-- 
-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