You are right and this is why I pass a flow panel first as an element
and then I add the widget itself to the flow panel using
FlowPanel.add(widget). I could get that to work on a "normal" div that
I had in my HTML file but with the map infoWindow it just won't work
and I really can't see the difference.


On Aug 4, 4:40 pm, John Ho <[email protected]> wrote:
> Because you are passing an Element, any handlers that were added to your
> Widget do not get passed along. To get around this, you will need to create
> a native JSNI function for your buttons and links.
>
> Example:
>
> yourButton.getElement().setPropertyJSO("onclick", yourClickFunction);
>
> Where yourClickFunction is defined in JSNI.
>
> On Thu, Aug 4, 2011 at 10:06 AM, Thomas Lefort <[email protected]>wrote:
>
>
>
>
>
>
>
> > I am debugging with firefox but I do not see any error. It's more like
> > all handlers have been wiped out, when I click on a link it doesn't do
> > anything anymore. If I try the exact same widget by adding it to
> > another widget or via uibinder all the links and buttons work fine.
>
> > On Aug 4, 4:01 pm, Juan Pablo Gardella <[email protected]>
> > wrote:
> > > Are you debbug with firebug or similar to see the error?
>
> > > 2011/8/4 Thomas Lefort <[email protected]>
>
> > > > If anybody can help, I am really pulling my hairs...
>
> > > > I am on my last bit of my jsni integration with maps v3. I want a
> > > > widget to appear in an infowindow. The widget has buttons and links.
> > > > All elements appear fine in the infowindow except that none of the
> > > > links, buttons work anymore.
>
> > > > This is what I do:
>
> > > > public native void openInfoWindowWidget(EOLatLng markerPosition,
> > > > Element element) /*-{
> > > >                var myElement = element;
>
> > $wnd.mapsJSNI.openInfoWindowWidget(markerPositi...@com.metaaps.webapps.earthimages.shared.domain.EOLatLng
> > > > ::lat,
> > > > markerPositi...@com.metaaps.webapps.earthimages.shared.domain.EOLatLng
> > > > ::lng,
> > > > myElement);
> > > > }-*/;
>
> > > > public final void openPropertiesWindow(EOLatLng currentCoordinate,
> > > > List<Property> properties, PropertiesChange callBack) {
> > > >                FlowPanel panel = new FlowPanel();
> > > >            openInfoWindowWidget(currentCoordinate, panel.getElement());
> > > >            panel.add(propertiesEditor);
> > > >        }
>
> > > > propertiesEditor is my widget, it's a field. I am adding the flowpanel
> > > > in between to avoid a call to getElement on the widget itself.
>
> > > > I would really appreciate any ideas!!!
>
> > > > Thanks
>
> > > > --
> > > > 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.
>
> > --
> > 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.

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