Create the preference path using wwpre_api_name.create_path. Create the preference using wwpre_api_name.create_name.

8-18 Oracle Fusion Middleware Developers Guide for Oracle Portal function get_default_preference ... begin -- -- Try to find a previously entered portlet instance string preference, -- if any. -- A portlet instance string preference is stored in the preference -- store and has a level of SYSTEM_LEVEL_TYPE. -- p_path = PORTLET_PATH || p_reference_path, l_prefs.string_id := to_charwwpre_api_value.get_value_as_number p_name = PREFNAME_STRING, p_level_type = wwpre_api_value.SYSTEM_LEVEL_TYPE ; -- -- If the value returned above is null it is an indication that there -- is no default string yet. Initialize the string id to 0 to indicate -- this and load the default string value. -- if l_prefs.string_id is null or to_numberl_prefs.string_id = 0 then wwpre_api_value.set_value_as_number p_path = PORTLET_PATH || p_reference_path, p_name = PREFNAME_STRING, p_level_type = wwpre_api_value.SYSTEM_LEVEL_TYPE, p_level_name = null, p_value = 0 ; ... end get_default_preference; 5. Find the show procedure. Notice the behavior when the portlet is in Edit Defaults or Edit mode. Note also how p_action is populated when the user clicks APPLY, CANCEL , or OK. Once the form is submitted, the show procedure of the portlet is called again and, if the p_action parameter is not null, then the save_prefs procedure is called to save the personalizations and redirect to the relevant page. procedure show p_portlet_record wwpro_api_provider.portlet_runtime_record is l_str varchar232000; l_pref_record preference_record; l_action varchar210; l_names owa.vc_arr; l_values owa.vc_arr; begin ... elsif p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT or p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS then wwpro_api_parameters.retrievel_names, l_values; for i in 1..l_names.count loop if upperl_namesi = upperp_string then l_pref_record.string := l_valuesi; elsif l_namesi = p_title then l_pref_record.title_string := l_valuesi; elsif l_namesi = p_action then