Web design seattle - 186 CHAPTER 6 DECOUPLED NAVIGATION PATTERN Figure
186 CHAPTER 6 DECOUPLED NAVIGATION PATTERN Figure 6-16. Calling sequence for the method nav.call E B V N In Figure 6-16, when the user clicks the Transfer button, the event onclick is triggered. The onclick event calls the method nav.call, which is of the type DecoupledNavigation. DecoupledNavigation has two methods (call and complete) that are of interest when calling a remote server. Executing the call method will call the Action functionality (OnClick) and the Data functionality (ConvertToBolded). The Data functionality will wire up the asynchronous HTTP call, and call the remote server. At this point the Decoupled Navigation pattern gives up control and waits for a response from the server. When the server receives a response, it is captured by DecoupledNavigation.complete, which then delegates to common.complete. Calling common restarts the Decoupled Navigation pattern and finishes the Data functionality part. Thereafter, the Presentation functionality starts, which calls the function InjectHTML. Calling InjectHTML causes the user interface to change and contains the bold code. Now that you understand the sequence of events, let s look at the method initializeRemote, which is responsible for wiring together the various methods: function DecoupledNavigation_InitializeRemote( common) common.async = new Asynchronous() common.complete = function( obj, status, statusText, responseText, responseXML) { common.openCallback = function( xmlhttp) { common.async.openCallback = function( xmlhttp) common.openCallback( xmlhttp) }
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.