Saturday, January 1, 2011

Re: UmbrellaException containing JavaScriptException

After writing code to catch the UmbrellaException and log it's stack
trace this problem was caused by the PlaceController invoking the
setWidget with a null widget. The code I wrote extending LayoutPanel
did not check for this and invoked the LayoutPanel.add() method with
the null widget. Modifying the my code to catch this and not invoke
the add() method when the widget is null fixed the problem.

Chris Marshall

On Dec 29 2010, 11:44 am, "cmarsh...@avenue100.com"
<cmarsh...@avenue100.com> wrote:
> We are currently starting to experiment with GWT and are considering
> using the MVP design pattern that has been described in the Google
> documentation for GWT.  Our intended application is an internal portal
> that will be implemented over time with different functions to be
> implemented independently.  My first attempt at possible structure is
> resulting in an UmbrellaException.
>
> The structure we are trying, is to have a TabLayoutPanel that is
> essentially the top level of the UI for the portal.  Then have
> individual GWT modules for each tab so that they can be easily
> developed independently and they can be assembled in different
> combinations for different purposes.  Everything worked until I
> attempted to use a DockLayoutPanel in one of the tabs.  At first I
> tried continuing with the SimplePanel that is set as the display in
> the ActivityManager which of course didn't work.  I created a new
> class that sub-classed SimplePanel and that implements ProvidesResize
> and RequiresResize expecting this to work but the DockLayoutPanel
> comes up blank.
>
> The next thing tried was to create a class that sub-classes
> LayoutPanel and implements AcceptsOneWidget to replace the SimplePanel
> that I originally was using (AcceptsOneWidget is required by the
> ActivityManager).  Doing this has the DockLayoutPanel displaying
> correctly, so far good!  The center panel has several CellTable(s) in
> it, one of which has buttons to implement a drill-through to
> additional information.  Clicking on one of the buttons causes the
> goto method in the Activity/Presenter to be invoked which in turn
> invokes the goto method in the PlaceController.  The PlaceController
> appears to invoke something related to the SimpleEventBus that then
> produces the UmbrellaException.  There appears to be a null value
> somewhere that is causing the issue.  The message in the
> JavaScriptException has "(TypeError): w is null".
>
> Any suggestions on how to track this down?  Is there a way of getting
> the DockLayoutPanel display correctly when inside a SimplePanel?
>
> thanks,
> Chris Marshall

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

No comments:

Post a Comment