In this lesson you learn how to use a GWT RequestBuilder object to make an asynchonous web service call and test if you are receiving a response. Kyle demonstrates how to use GWT.log() statements to test if the call succeeds or fails.
- [Instructor] At this point,…we've looked at the AJAX response.…Let's take a quick review of that.…AJAX response is responding with all these rates.…In our code, our template xml file,…we have two list boxes.…One for primary rate lists…and a second for second rate lists.…Right now I have some hard coded rates…that we want to make this dynamic.…So I really don't want to have these rates hard coded.…I want them to be populated by what's sent back…by the web service.…
We're going to do that in the Converter Owner class.…And we'll do that in a new method.…I'll call this method SetConversionDataUi.…It's going to be a private method…because we're not going to use it anywhere else…and it'll have a return type of void.…In this method is where we'll set the rates…in the template xml.…We want to set them immediately,…so we'll do it right after the converterUiBinder…widget is created.…
So right after widget is where I'll make the call…to setConversionDataUi.…Part of this method, the very first part,…is to make that web service call.…
In this course, learn how to build high-performance, browser-based apps using GWT. Kyle Gower-Winter introduces you to GWT, explaining the benefits of using this toolkit to build dynamic web pages. To help you practice what you learn, he shows how to build a simple foreign exchange rate application. Plus, Kyle covers managing AJAX events on the client, handling UI action events, debugging code, and more.
- Creating and running a GWT application
- Working with GWT widgets and UiBinder
- Manage AJAX events on the client
- Using a GWT RequestBuilder object
- Debugging in the browser
- Setting breakpoints and inspecting variables
- Running locally in production mode