Hi,

I have been working on code splitting for my activites. I figured I could put this in the activity mappers. The following is a snippet of the getActivity method used to achieve this. I needed to put in a hack and store the activity in an array as this needed to be final in order for this to be returned.

What are peoples views and is there a more best practice approach?

Thanks

Craig


        final Activity[] activity = new Activity[1];

        if (place instanceof LoginPlace)
        {
            GWT.runAsync(new RunAsyncCallback()
            {
                public void onFailure(Throwable caught)
                {
                    Window.alert("Code download failed");
                }

                public void onSuccess()
                {
activity[0] = new LoginActivity(clientFactory.getLoginView(), sessionContext);
                }
            });

        }

        return activity[0];

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to