Databases Reference
In-Depth Information
The code was instrumented using Console Wrapper, a free, opensource wrapper
for Console. Console Wrapper has tight integration with APEX and, by default, will
be enabled only when APEX is run in debug mode. For more information, please
visit http://code.google.com/p/js-console-wrapper/ .
options : Options that can be set by the calling function; some of these options will
be setup as plug-in attributes so APEX developers can explicitly configure them.
_create : This instantiates the jQuery UI date picker for the input element and sets
the initial date restrictions based on other dates.
plugineventonselect : In the _create function, there's a call to
$(this).trigger('plugineventonselect', extraParams) . This triggers a custom
event thatcan be used when creating a dynamic action. An additional
configuration (covered later) is required.
_onChangeHandler : When a date is changed, this function will be called. It will
change the min/max date restriction for the other date.
Since jquery.ui.clarifitFromToDatePicker_1.0.0.js references Console Wrapper, you will also
need to copy the console wrapper file to c:\www\FromToDatePicker . $console_wrapper_1.0.3.js is
included with this topic, or you can download it from http://code.google.com/p/js-console-wrapper/ .
For now you will not need to include the JavaScript file directly in the plug-in since you'll be
referencing the copy on the web server. If there are any bugs in the code, it is much easier to debug. At
the end of this chapter, you will bundle the JavaScript directly into the plug-in.
Adding Custom Attributes
Adding custom attributes can be done at any time while developing a plug-in. You'll tend to know some
of the attributes right away and then add some additional attributes as you finalize the plug-in.
Based on the JavaScript code, there are two attributes that will be required: icon image location and
when to show the calendar. To create the icon image location attribute, do the following:
1.
Edit the plug-in and scroll to the Custom Attributes region.
2.
Click the Add Attribute button, as shown in Figure 3-9.
Figure 3-9. Adding an attribute
 
Search WWH ::




Custom Search