176 CHAPTER 6 DECOUPLED (Web hosting colocation) NAVIGATION PATTERN function

176 CHAPTER 6 DECOUPLED NAVIGATION PATTERN function DecoupledNavigation_call( evt, action, data, presentation) { evt = (evt) ? evt : ((event) ? event : null); if ( evt) { var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ( elem) var obj = new Object() obj.event = evt; obj.parent = this; obj.element = elem; obj.state = new Object() obj.presentation = presentation; if ( (action) != null) if ( action( obj) != true) { return false; obj.isRemote = false; if ( (data) != null) if ( data( obj) != true) { return false; } E B V N } if( obj.isRemote) { return true; if (presentation != null) if ( presentation( obj, obj.state) != true) { return false; return true; return true; } The implementation of DecoupledNavigation_call has four parameters. The first parameter, evt, is the event object. Whether the first parameter has a valid value goes back to the event problem outlined in the Event Bubbling section. The second parameter, action, is a function reference to an Action functionality (for example, OnClick). The third parameter, data, represents the function reference that performs a state manipulation. The fourth parameter, presentation, is a function reference to a Presentation functionality, which usually is some HTML control. All of the lines up to if( elem) were outlined in the Event Bubbling section and are used to extract the HTML event and HTML source element. The lines thereafter are the important lines and represent the technical details of the Common Data functionality. These lines represent the state as an object instead of a series of
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply