Databases Reference
In-Depth Information
Note It is important to include the NAME attribute in the input element, as it is used in the form submission, and
not the element's ID attribute. In general the ID is used as reference when the page is displayed and the NAME
attribute is referenced from the server.
If you refresh Page 10, it will look like Figure 3-25 (note: if the item labels do not appear, then edit
each item and add the label). You could submit the form, and APEX would process the items as a regular
item.
Figure 3-25. From/to date picker with input elements
If you click either date field, nothing happens. They currently behave like regular text input fields.
This is because you haven't linked the JavaScript code with the plug-in yet. Before including the
JavaScript code in your plug-in, you need to create some variables to reference the custom attributes.
Add the following code in the variable declaration section of the PL/SQL function:
...
-- Application Plugin Attributes
v_button_img apex_appl_plugins.attribute_01%type := p_plugin.attribute_01;
-- Item Plugin Attributes
v_show_on apex_application_page_items.attribute_01%type := lower(p_item.attribute_01); -- When
to show date picker. Options: focus, button, both
v_date_picker_type apex_application_page_items.attribute_01%type :=
lower(p_item.attribute_02); -- from or to
v_other_item apex_application_page_items.attribute_01%type := upper(p_item.attribute_03); --
Name of other date picker item
-- Other variables
-- Oracle date formats different from JS date formats
v_orcl_date_format_maskp_item.format_mask%type; -- Oracle date format:
http://www.techonthenet.com/oracle/functions/to_date.php
v_js_date_format_maskp_item.format_mask%type; -- JS date format:
http://docs.jquery.com/UI/Datepicker/formatDate
v_other_js_date_format_maskapex_application_page_items.format_mask%type; -- This is the other
datepicker's JS date format. Required since it may not contain the same format mask as this
date picker
...
 
 
Search WWH ::




Custom Search