Databases Reference
In-Depth Information
' <p>' + uiw.options.warningMsgText +
'</p></td></tr></table></div>';
$('body').append(html);
$('#' + warningId).position({
of: uiw.element,
my: uiw.options.warningMsgAlignment,
at: uiw.options.passwordAlignment,
offset: uiw.options.offset,
collision: 'none'
});
}
},
hideMessage: function() {
var uiw = this;
var warningId = uiw.element.attr('id') + ' CL WARNING';
$('#' + warningId).remove();
}
});
})(apex.jQuery);
Developing a Region Plug-in
In this tutorial you will create a Calendar region plug-in. The native Calendar region in APEX is great, but
it leaves a little to be desired. A full-fledged JavaScript calendar would be attractive, but creating one
could be a full-time job. Luckily, Adam Shaw created FullCalendar, a jQuery plug-in that provides a full-
sized calendar with a lot of interactive functionality. Even better is the fact that FullCalendar is open
source and dual licensed under MIT and GPL Version 2 licenses.
This tutorial will demonstrate how third-party solutions can be integrated with APEX as a plug-in.
Third-party code can drastically reduce the amount of time needed to develop a plug-in as only enough
code to complete the integration is required. Once complete, these plug-ins can easily be reused in
many APEX applications.
To take advantage of FullCalendar, you will first need to download the latest FullCalendar package,
which can be found at http://arshaw.com/fullcalendar/download/ . (Exactly which files from the
package will be used in the plug-in will be discussed later.) Exploring the FullCalendar documentation
will help you understand why the APEX plug-in was developed the way that it was. It may also provide
you with insight into how the APEX plug-in could be enhanced to better suit your own needs.
To begin creating the plug-in, navigate to Shared Components Plug-ins and follow these steps as
shown in Figure 11-40.
1.
Click Create >.
2.
Set Name to PlugGen Calendar (1.0).
3.
Set Internal Name to COM_PLUGGEN_GEOCODE.
4.
Set Type to Region.
5.
Set PL/SQL Code to the code from Listing 11-6.
6.
Set Render Function Name to calendar_render.
Search WWH ::




Custom Search