Spis procedur i funkcji pakietów HTP i HTF

Spis treści:

  1. Wypisywanie
  2. Podstawowe znaczniki
  3. Znaczniki formatujące
  4. Znaczniki formularzy
  5. Odsyłacze i grafika
  6. Tabele
  7. Listy
  8. Formatowanie tekstu
  9. Komentarz
  10. Obiekty
Procedury i funkcje HTML
Wypisywanie
htp.print
(cbuf in varchar2 | dbuf in date | nbuf in number);
htp.p
(cbuf in varchar2 | dbuf in date | nbuf in number);
Wypisuje linię kodu HTML i przechodzi do nowej linii.
htp.prints
(ctext in varchar2);

htp.ps
(ctext in varchar2);
Wypisuje napis ctext, w którym znaki zastrzeżone w HTML są zamienione na napisy symboliczne (tzw. encje SGML), np. < przechodzi na &lt.
Podstawowe znaczniki
htp.htmlOpen; <HTML>
htp.htmlClose; </HTML>
htp.headOpen; <HEAD>
htp.headClose; </HEAD>
htp.title
(ctitle in varchar2);
<TITLE>ctitle</TITLE>
htp.script
(cscript in varchar2,
clanguage in varchar2 DEFAULT NULL);
<SCRIPT LANGUAGE=clanguage>cscript</SCRIPT>
HTP.bodyOpen
(CBACKGROUND in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);
<BODY BACKGROUND=cbackground cattributes>
htp.bodyClose; </BODY>
Znaczniki formatujące
htp.header
(nsize in integer,
cheader in varchar2,
calign in varchar2 DEFAULT NULL,
cnowrap in varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);
<Hnsize>cheader</Hnsize>
(od <H1> do <H6>)
htp.para
(calign in varchar2 DEFAULT NULL,
cnowrap in varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htp.paragraph
(calign, cnowrap, cclear, cattributes);

htf.paragraph
(calign, cnowrap, cclear, cattributes)
return varchar2;
<P ALIGN=calign NOWRAP=cnowrap CLEAR=cclear cattributes>
htp.br
(cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.br
(cclear, cattributes)
return varchar2;
<BR CLEAR=cclear cattributes>
htp.hr
(cclear in varchar2 DEFAULT NULL,
csrc in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.hr
(cclear, csrc, cattributes)
return varchar2;
<HR CLEAR=cclear SRC=csrc cattributes>
htp.centerOpen;

htf.centerOpen return varchar2;
<CENTER>
htp.centerClose;

htf.centerClose return varchar2;
</CENTER>
Znaczniki formularzy
htp.formOpen
(curl in varchar2,
cmethod in varchar2 DEFAULT 'POST',
ctarget in varchar2, cenctype in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formOpen
(curl, cmethod, ctarget, cenctype, cattributes) return varchar2;
<FORM ACTION=curl METHOD=cmethod TARGET=ctarget ENCTYPE=cenctype cattributes>
htp.formClose;

htf.formClose return varchar2;
</FORM>
htp.formText
(cname in varchar2,
csize in varchar2 DEFAULT NULL,
cmaxlength in varchar2 DEFAULT NULL,
cvalue in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formText
(cname, csize, cmaxlength, cvalue, cattributes)
return varchar2;
<INPUT TYPE="text" NAME=cname SIZE=csize MAXLENGTH=cmaxlength VALUE=cvalue cattributes>
htp.formPassword
(cname in varchar2,
csize in varchar2 DEFAULT NULL,
cmaxlength in varchar2 DEFAULT NULL,
cvalue in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formPassword
(cname, csize, cmaxlength, cvalue, cattributes)
return varchar2;
<INPUT TYPE="password" NAME=cname SIZE=csize MAXLENGTH=cmaxlength VALUE=cvalue cattributes>
htp.formCheckbox
(cname in varchar2,
cvalue in varchar2 DEFAULT 'ON',
cchecked in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formCheckbox
(cname, cvalue, cchecked, cattributes)
return varchar2;
<INPUT TYPE="checkbox" NAME=cname VALUE=cvalue CHECKED=cchecked cattributes>
htp.formHidden
(cname in varchar2,
cvalue in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formHidden
(cname, cvalue, cattributes)
return varchar2;
<INPUT TYPE="checkbox" NAME=cname VALUE=cvalue cattributes>
htp.formImage
(cname in varchar2,
csrc in varchar2,
calign in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formImage
(cname, csrc, calign, cattributes)
return varchar2;
<INPUT TYPE="image" NAME=cname SRC=csrc ALIGN=calign cattributes>
htp.formRadio
(cname in varchar2,
cvalue in varchar2,
cchecked in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formRadio
(cname, cvalue, cchecked, cattributes)
return varchar2;
<INPUT TYPE="radio" NAME=cname VALUE=cvalue CHECKED=cchecked cattributes>
htp.formSelectOpen
(cname in varchar2,
cprompt in varchar2 DEFAULT NULL,
csize in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formSelectOpen
(cname, cprompt, csize, cattributes)
return varchar2;
cprompt<SELECT NAME=cname SIZE=csize cattributes>
htp.selectClose;

htf.selectClose
return varchar2;
</SELECT>
htp.formSelectOption
(cvalue in varchar2,
cselected in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formSelectOption
(cvalue, cselected, cattributes)
return varchar2;
<OPTION SELECTED=cselected cattributes>cvalue
htp.formSubmit
(cname in varchar2 DEFAULT NULL,
cvalue in varchar2 DEFAULT 'Submit',
cattributes in varchar2 DEFAULT NULL);

htf.formSubmit
(cname, cvalue, cattributes)
return varchar2;
<INPUT TYPE="submit" NAME=cname VALUE=cvalue cattributes>
htp.formTextareaOpen2
(cname in varchar2,
nrows in integer,
ncolumns in integer,
calign in varchar2 DEFAULT NULL,
cwrap in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.formTextareaOpen
(cname, nrows, ncolumns, calign, cwrap, cattributes)
return varchar2;
<TEXTAREA NAME=cname ROWS=nrows COLS=ncolumns ALIGN=calign WRAP=cwrap cattributes>
htp.formTextareaClose;

htf.formTextareaClose
return varchar2;
</TEXTAREA>
Odsyłacze i grafika
htp.anchor2
(curl varchar2,
ctext in varchar2,
cname in varchar2 DEFAULT NULL,
ctarget in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.anchor2
(curl, ctext, cname, ctarget, cattributes)
return varchar2;
<A HREF=curl NAME=cname TARGET=ctarget cattributes> ctext</A>
htp.img
(curl varchar2 DEFAULT NULL,
calign in varchar2 DEFAULT NULL,
calt in varchar2 DEFAULT NULL,
cismap in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.img
(curl, calign, calt, cismap, cattributes)
return varchar2;
<IMG SRC=curl ALIGN=calign ALT=calt ISMAP=cismap cattributes>
Tabele
htp.tableOpen
(cborder varchar2 DEFAULT NULL,
calign in varchar2 DEFAULT NULL,
cnowrap in varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.tableOpen
(cborder, calign, cnowrap, cclear, cattributes)
return varchar2;
<TABLE BORDER=cborder NOWRAP=cnowrap ALIGN=calign CLEAR=cclear cattributes>
htp.tableClose;

htf.tableClose
return varchar2;
</TABLE>
htp.tableRowOpen
(calign varchar2 DEFAULT NULL,
cvalign in varchar2 DEFAULT NULL,
cdp in varchar2 DEFAULT NULL,
cnowrap in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.tableRowOpen
(calign, cvalign, cdp, cnowrap, cattributes)
return varchar2;
<TR ALIGN=calign VALIGN=cvalign DP=cdp NOWRAP=cnowrap cattributes>
htp.tableRowClose;

htf.tableRowClose
return varchar2;
</TR>
htp.tableData
(cvalue varchar2 DEFAULT NULL,
calign in varchar2 DEFAULT NULL,
cdp in varchar2 DEFAULT NULL,
cnowrap in varchar2 DEFAULT NULL,
crowspan in varchar2 DEFAULT NULL,
ccolspan in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.tableData
(cvalue, calign, cdp, cnowrap, crowspan, ccolspan, cattributes)
return varchar2;
<TD ALIGN=calign DP=cdp CROWSPAN=crowspan COLSPAN=ccolspan NOWRAP=cnowrap cattributes>cvalue</TD>
Listy
htp.listItem
(ctext varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cdingbat in varchar2 DEFAULT NULL,
csrc in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.listItem
(ctext, cclear, cdingbat, csrc, cattributes)
return varchar2;
<LI CLEAR=cclear DINGBAT=cdingbat SRC=csrc cattributes>ctext
htp.ulistOpen
(cclear varchar2 DEFAULT NULL,
cwrap in varchar2 DEFAULT NULL,
cdingbat in varchar2 DEFAULT NULL,
csrc in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.ulistOpen
(cclear, cwrap, cdingbat, csrc, cattributes)
return varchar2;
<UL CLEAR=cclear WRAP=cwrap DINGBAT=cdingbat SRC=csrc cattributes>
htp.ulistClose;

htf.ulistClose
return varchar2;
</UL>
htp.olistOpen
(cclear varchar2 DEFAULT NULL,
cwrap in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.olistOpen
(cclear, cwrap, cattributes)
return varchar2;
<OL CLEAR=cclear WRAP=cwrap cattributes>
htp.olistClose;

htf.olistClose
return varchar2;
</OL>
htp.dlistOpen
(cclear varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.dlistOpen
(cclear, cattributes)
return varchar2;
<DL CLEAR=cclear cattributes>
htp.dlistClose;

htf.dlistClose
return varchar2;
</DL>
htp.dlistTerm
(ctext varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.dlistTerm
(ctest, cclear, cattributes)
return varchar2;
<DT CLEAR=cclear cattributes>ctext
htp.dlistDef
(ctext varchar2 DEFAULT NULL,
cclear in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.dlistDef
(ctest, cclear, cattributes)
return varchar2;
<DD CLEAR=cclear cattributes>ctext
Formatowanie tekstu
htp.fontOpen
(ccolor in varchar2 DEFAULT NULL,
cface in varchar2 DEFAULT NULL,
csize in varchar2 DEFAULT NULL,
cattributes in varchar2 DEFAULT NULL);

htf.fontOpen
(ccolor, cface, csize, cattributes)
return varchar2;
<FONT COLOR=ccolor FACE=cface SIZE=csize cattributes>
htp.bold
(ctext in varchar2,
cattributes in varchar2 DEFAULT NULL);

htf.bold
(ctext, cattributes)
return varchar2;
<B cattributes>ctext</B>
htp.strong
(ctext in varchar2,
cattributes in varchar2 DEFAULT NULL);

htf.strong
(ctext, cattributes)
return varchar2;
<STRONG cattributes>ctext</STRONG>
htp.em
(ctext in varchar2,
cattributes in varchar2 DEFAULT NULL);

htf.em
(ctext, cattributes)
return varchar2;
<EM cattributes>ctext</EM>
htp.italic
(ctext in varchar2,
cattributes in varchar2 DEFAULT NULL);

htf.italic
(ctext, cattributes)
return varchar2;
<ITALIC cattributes>ctext</ITALIC>
Komentarz
htp.comment
(ctext in varchar2);

htf.comment
(ctext)
return varchar2;
<! ctext -->
Obiekty
htp.appletOpen
(ccode in varchar2,
nheight in integer,
nwidth in integer,
cattributes in varchar2 DEFAULT NULL);

htf.appletOpen
(ccode, nheight, nwidth, cattributes)
return varchar2;
<APPLET CODE=ccode HEIGHT=nheight WIDTH=hwidth cattributes>
htp.appletClose;

htf.appletClose
return varchar2;
</APPLET>
htp.param
(cname in varchar2,
cvalue in varchar2);

htf.param
(cname, cvalue)
return varchar2;
<PARAM NAME=cname VALUE=cvalue>