Databases Reference
In-Depth Information
2.
In the Callbacks region, click the Validation Function Name label. This will
display the pop-up help, as shown in Figure 3-38.
Figure 3-38. Validation function spec
Copy the spec header and paste it into pkg_apress_plugins.pks . Name the
function f_validate_from_to_datepicker . The full function header should
look like the following code block in pkg_apress_plugins.pks :
3.
...
FUNCTION f_validate_from_to_datepicker (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value IN VARCHAR2 )
RETURN apex_plugin.t_page_item_validation_result;
...
4.
Modify pkg_apress_plugins.pkb and add the following code at the end of
the package. The function shown here shares some very similar aspects
when compared to the render function—for example, similar variable
declarations and the debug information. Note that this function is not
complete yet. v_result allows you to set the error message and some
additional attributes. Refer to the APEX documentation for all the
available options.
...
FUNCTION f_validate_from_to_datepicker (
p_item IN apex_plugin.t_page_item,
p_plugin IN apex_plugin.t_plugin,
p_value IN VARCHAR2 )
RETURN apex_plugin.t_page_item_validation_result
AS
-- Variables
v_orcl_date_formatapex_application_page_items.format_mask%type; -- oracle date format
v_date date;
 
Search WWH ::




Custom Search