1: package body WFA_HTML_UTIL as
2: /* $Header: wfhtmb.pls 120.5.12010000.4 2009/01/14 09:14:16 sudchakr ship $ */
3:
4:
5: --
41: -- Print URL
42: urlstring:=wf_notification.GetURLText(value, nid);
43:
44: -- Bug 4634849
45: urlstring := wfa_html.encode_url(urlstring);
46: htp.p('
48: htp.tableRowClose;
49:
50: exception
51: when others then
52: wf_core.context('Wfa_Html_Util', 'GetUrl', value, description, to_char(nid));
53: raise;
54: end GetUrl;
55:
56: --
73: nkey in varchar2)
74: is
75: len pls_integer;
76: l_url varchar2(1000);
77: l_media varchar2(240) := wfa_html.image_loc;
78: l_icon varchar2(30) := 'FNDILOV.gif';
79: l_username varchar2(320); -- Username to query
80: l_document_name Varchar2(240) := NULL;
81: l_callback_URL varchar2(4000);
129: -- Check session and current user
130: if (nkey is null) then
131: wfa_sec.GetSession(l_username);
132: else
133: -- copy this from wfa_html.authenticate
134: slash := instr(nkey, '/');
135: if (slash <> 0) then
136: wfsession := to_char(nid)||'/'||substr(nkey, slash+1);
137: else
205: -- the proper escape sequence.
206: l_url := 'javascript:fnd_open_dm_display_window('||''''||
207: REPLACE('wf_lov.display_lov?p_lov_name='||'owner'||
208: '&p_display_name='||'WFA_FIND_USER'||
209: '&p_validation_callback=wfa_html.wf_user_val'||
210: '&p_dest_hidden_field=top.opener.parent.bottom.document.WFNOTRESP.h_fvalues['||to_char(index_num)||'].value'||
211: '&p_current_value=top.opener.parent.bottom.document.WFNOTRESP.h_fdocnames['||to_char(index_num)||'].value'||
212: '&p_display_key='||'Y'||
213: '&p_dest_display_field=top.opener.parent.bottom.document.WFNOTRESP.h_fdocnames['||to_char(index_num)||'].value',
239: calign=>'Left', cattributes=>'id=""');
240: end if;
241: exception
242: when others then
243: wf_core.context('Wfa_Html_Util', 'GetField', name, type, format, dvalue);
244: raise;
245: end GetField;
246:
247: --
297:
298: htp.p('
299:
300: htp.p('
310: end if;
311:
312: exception
313: when others then
314: wf_core.context('Wfa_Html_Util', 'GetLookup', name, value, format);
315: raise;
316: end GetLookup;
317:
318: --
346: when no_data_found then
347: return;
348: end;
349:
350: if (respcnt > wfa_html_util.result_button_threshold) then
351: -- If number of responses over threshold use a select list instead.
352: wfa_html_util.GetLookup('RESULT', value, format, TRUE);
353: else
354: -- Use buttons.
348: end;
349:
350: if (respcnt > wfa_html_util.result_button_threshold) then
351: -- If number of responses over threshold use a select list instead.
352: wfa_html_util.GetLookup('RESULT', value, format, TRUE);
353: else
354: -- Use buttons.
355:
356: -- Add a hidden field for the result field name
359:
360: -- Add a button for every lookup
361: for i in lookup_codes(format) loop
362: htp.p('
363: wfa_html.create_reg_button ('javascript:document.WFNOTRESP.h_fvalues['||
364: TO_CHAR(indexer)||'].value='||
365: ''''||i.lookup_code||''''||';document.WFNOTRESP.submit()',
366: i.meaning,
367: wfa_html.image_loc,
368: null,
369: i.meaning);
370: htp.p('
375: end if;
376:
377: exception
378: when others then
379: wf_core.context('Wfa_Html_Util', 'GetButtons', value, format);
380: raise;
381: end GetButtons;
382:
383: --
435: ** or an internal name, make sure to get the unique internal name
436: */
437: l_attr_value := attr_value;
438:
439: wfa_html.validate_display_name (doc_name, l_attr_value);
440:
441: --
442: -- Set the role to upper
443: --
461: end if;
462:
463: exception
464: when others then
465: wf_core.context('Wfa_Html_Util', 'SetAttribute',
466: to_char(nid), attr_name_type, attr_value);
467: raise;
468: end SetAttribute;
469:
493: exception
494: when no_data_found then
495: return(lcode);
496: when others then
497: wf_core.context('Wfa_Html_Util', 'GetLookupMeaning', ltype, lcode);
498: raise;
499: end GetLookupMeaning;
500:
501: --
527: and MA.TYPE = 'URL';
528:
529: exception
530: when others then
531: wf_core.context('Wfa_Html_Util', 'GetUrlCount', to_char(nid));
532: raise;
533: end GetUrlCount;
534:
535: --
564: return(buf);
565:
566: exception
567: when others then
568: wf_core.context('Wfa_Html_Util', 'GetResponseUrl', to_char(nid));
569: raise;
570: end GetResponseUrl;
571:
572: --
603: elsif (type = 'DATE') then
604: --
605: value := wf_notification_util.GetCalendarDate( wf_notification_util.getCurrentNID() , dvalue, format);
606: elsif (type = 'LOOKUP') then
607: value := wfa_html_util.GetLookupMeaning(format, tvalue);
608: elsif (type = 'URL') then
609: value := tvalue;
610: elsif (type = 'ROLE') then
611: wf_directory.GetRoleInfo(tvalue, value, s0, s0, s0, s0);
617: return(value);
618:
619: exception
620: when others then
621: wf_core.context('Wfa_Html_Util', 'GetDisplayWindow', type, format,
622: tvalue, to_char(nvalue), to_char(dvalue));
623: raise;
624: end GetDisplayValue;
625:
657: end;
658:
659: exception
660: when OTHERS then
661: wf_core.context('Wfa_Html_Util', 'GetDenormalizedValues',
662: to_char(nid), langcode);
663: raise;
664: end GetDenormalizedValues;
665:
662: to_char(nid), langcode);
663: raise;
664: end GetDenormalizedValues;
665:
666: end WFA_HTML_UTIL;