Databases Reference
In-Depth Information
_setWidgetVars: This function is used to define and set private variables. This is
not a reserved function name in the jQuery UI Widget Factory, but rather a
technique to store private variables.
options: options is a reserved name that consists of a set of public variables.
The values that are placed in this variable are the default values. When the
widget is called, the calling function can define each of these option values.
_create: The _create function is a reserved function that is run the first time the
widget is bound to an object.
_init: The _init function is a reserved function that is called after the _ create
function and each time the widget is called with no parameters. The _init
method is not required, and you may not require it for your APEX plug-ins.
getBaseFontSize: This is a custom function that is publicly accessible. It is
required since the variable baseFontSize is a private variable and needs a
specific getter method to retrieve its value.
destroy: The destroy method disassociates the widget from the object and
should undo anything that the widget did to the object. In this example, the
destroy method returns the font size back to its original state. The destroy
method is not required and you probably won't need to implement it for APEX
plug-ins.
To demonstrate how to use this widget, open ch08\jqueryUIWidgetFactory-Demo.html in Firefox.
This file is included as part of the topic's attached files. Once you have opened the file in Firefox, click
F12 to open Firebug. This will allow you to see the log outputs in the Console window. Click each link in
the order described below. Screenshots are included to highlight all the changes. Figure 8-15 shows the
original state of the page.
Figure 8-15. jQuery UI Widget Factory demo: initial page
 
Search WWH ::




Custom Search