|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.html.PajeTemplate
Generates an Paje instance from a source HTML file. The source HTML file must be at least XHTML version 1.0 transitional compliant, and therefore, for example, all tags that can have an end tag must have one, including the oft-omitted </p> tag. The use of a utility such as HTMLTidy is recommended.
Sub-classes can perform general tag-specific processing as the template is
parsed by over-riding postProcessTag(org.pajes.html.HTML). Post-processing of specific
HTML and Input instances is handled by creating methods in the sub-class with
the signature:
public HTML postProcessID_<ID= ATTRIBUTE>(HTML html)
public HTML postProcessField_<NAME= ATTRIBUTE>(HTML html)
The template uses reflection to identify to the correct methods to be called. If a method does not exist for a specific ID or NAME attribute, no error is generated.
Document-specific processing by the sub-class is handled by over-riding
postProcessDocument(org.pajes.html.Paje).
Any warnings are added to the header section of the resulting document as comments, with a JavaScript alert to warn of their presence.
PajeFactory| Constructor Summary | |
PajeTemplate()
Creates a PajeTemplate that will generate Paje instances. |
|
PajeTemplate(java.lang.Class pajeClass)
Creates a PajeTemplate that will generate instances of the specified Paje sub-class. |
|
| Method Summary | |
protected void |
addToContainer(HTML html)
Adds the specfied HTML object to the current container. |
protected void |
addToContainer(HTML html,
boolean push)
Adds the specfied HTML object to the current container. |
protected void |
addToContainer(java.lang.String text)
Adds the specfied text to the current container as PlainText (ie
with no character encoding). |
protected void |
clearWarnings()
Clears any warnings that were created by the last generate(org.pajes.html.PajeParser). |
protected void |
dumpAttributes(java.lang.String[][] attributes)
Internal debugging method to dump the attributes array to System.out. |
Paje |
generate(PajeParser parser)
Generates the base Paje instance by processing the parser. |
Paje |
generate(PajeParser parser,
Paje document)
Generates the base Paje instance by processing the parser. |
protected int |
getAttributeIndex(java.lang.String[][] attributes,
java.lang.String name)
Returns the index of the specified attribute in an array of attributes. |
protected java.lang.String |
getAttributeValue(java.lang.String[][] attributes,
java.lang.String name)
Returns the value of the specified attribute in an array of attributes. |
protected Container |
getCurrentContainer()
Returns the container to which objects are currently being added. |
protected Form |
getCurrentForm()
Returns the current HTML form to which objects are being added. |
PajeTemplateWarning |
getWarning()
Returns the first warning set when processing this template. |
protected void |
handleEmptyTag(java.lang.String[][] attributes)
Checks for and handles an empty tag. |
void |
handleTag_a(java.lang.String[][] attributes)
Handles a tags found in the HTML source file. |
void |
handleTag_applet(java.lang.String[][] attributes)
Handles applet tags found in the HTML source file. |
void |
handleTag_area(java.lang.String[][] attributes)
Handles area tags found in the HTML source file. |
void |
handleTag_b(java.lang.String[][] attributes)
Handles b tags found in the HTML source file. |
void |
handleTag_base(java.lang.String[][] attributes)
Handles base tags found in the HTML source file. |
void |
handleTag_big(java.lang.String[][] attributes)
Handles big tags found in the HTML source file. |
void |
handleTag_body(java.lang.String[][] attributes)
Handles body tags found in the HTML source file. |
void |
handleTag_br(java.lang.String[][] attributes)
Handles br tags found in the HTML source file. |
void |
handleTag_center(java.lang.String[][] attributes)
Handles center tags found in the HTML source file. |
void |
handleTag_cite(java.lang.String[][] attributes)
Handles cite tags found in the HTML source file. |
void |
handleTag_code(java.lang.String[][] attributes)
Handles code tags found in the HTML source file. |
void |
handleTag_dfn(java.lang.String[][] attributes)
Handles dfn tags found in the HTML source file. |
void |
handleTag_div(java.lang.String[][] attributes)
Handles div tags found in the HTML source file. |
void |
handleTag_em(java.lang.String[][] attributes)
Handles em tags found in the HTML source file. |
void |
handleTag_embed(java.lang.String[][] attributes)
Handles embed tags found in the HTML source file. |
void |
handleTag_font(java.lang.String[][] attributes)
Handles font tags found in the HTML source file. |
void |
handleTag_form(java.lang.String[][] attributes)
Handles form tags found in the HTML source file. |
void |
handleTag_frame(java.lang.String[][] attributes)
Handles frame tags found in the HTML source file. |
void |
handleTag_frameset(java.lang.String[][] attributes)
Handles frameset tags found in the HTML source file. |
void |
handleTag_h1(java.lang.String[][] attributes)
Handles h1 tags found in the HTML source file. |
void |
handleTag_h2(java.lang.String[][] attributes)
Handles h2 tags found in the HTML source file. |
void |
handleTag_h3(java.lang.String[][] attributes)
Handles h3 tags found in the HTML source file. |
void |
handleTag_h4(java.lang.String[][] attributes)
Handles h4 tags found in the HTML source file. |
void |
handleTag_h5(java.lang.String[][] attributes)
Handles h5 tags found in the HTML source file. |
void |
handleTag_h6(java.lang.String[][] attributes)
Handles h6 tags found in the HTML source file. |
void |
handleTag_head(java.lang.String[][] attributes)
Handles head tags found in the HTML source file. |
void |
handleTag_hr(java.lang.String[][] attributes)
Handles hr tags found in the HTML source file. |
void |
handleTag_html(java.lang.String[][] attributes)
Handles html tags found in the HTML source file. |
void |
handleTag_i(java.lang.String[][] attributes)
Handles i tags found in the HTML source file. |
void |
handleTag_iframe(java.lang.String[][] attributes)
Handles iframe tags found in the HTML source file. |
void |
handleTag_img(java.lang.String[][] attributes)
Handles img tags found in the HTML source file. |
void |
handleTag_input_button(java.lang.String[][] attributes)
Handles input button tags found in the HTML source file. |
void |
handleTag_input_checkbox(java.lang.String[][] attributes)
Handles input checkbox tags found in the HTML source file. |
void |
handleTag_input_file(java.lang.String[][] attributes)
Handles input file tags found in the HTML source file. |
void |
handleTag_input_hidden(java.lang.String[][] attributes)
Handles input hidden tags found in the HTML source file. |
void |
handleTag_input_image(java.lang.String[][] attributes)
Handles input image tags found in the HTML source file. |
void |
handleTag_input_password(java.lang.String[][] attributes)
Handles input password tags found in the HTML source file. |
void |
handleTag_input_radio(java.lang.String[][] attributes)
Handles input radio tags found in the HTML source file. |
void |
handleTag_input_reset(java.lang.String[][] attributes)
Handles input reset tags found in the HTML source file. |
void |
handleTag_input_submit(java.lang.String[][] attributes)
Handles input submit tags found in the HTML source file. |
void |
handleTag_input_text(java.lang.String[][] attributes)
Handles input text tags found in the HTML source file. |
void |
handleTag_input(java.lang.String[][] attributes)
Called by handleTag(java.lang.String[][]) to determines and pass to control to the
appropriate handleTag_input_XXX method to process the
input tag represented by the specified attributes. |
void |
handleTag_kbd(java.lang.String[][] attributes)
Handles kbd tags found in the HTML source file. |
void |
handleTag_label(java.lang.String[][] attributes)
Handles label tags found in the HTML source file. |
void |
handleTag_li(java.lang.String[][] attributes)
Handles li tags found in the HTML source file. |
void |
handleTag_link(java.lang.String[][] attributes)
Handles link tags found in the HTML source file. |
void |
handleTag_map(java.lang.String[][] attributes)
Handles map tags found in the HTML source file. |
void |
handleTag_meta(java.lang.String[][] attributes)
Handles meta tags found in the HTML source file. |
void |
handleTag_nobr(java.lang.String[][] attributes)
Handles nobr tags found in the HTML source file. |
void |
handleTag_noembed(java.lang.String[][] attributes)
Handles embed tags found in the HTML source file. |
void |
handleTag_noframes(java.lang.String[][] attributes)
Handles noframes tags found in the HTML source file. |
void |
handleTag_noscript(java.lang.String[][] attributes)
Handles noscript tags found in the HTML source file. |
void |
handleTag_object(java.lang.String[][] attributes)
Handles object tags found in the HTML source file. |
void |
handleTag_ol(java.lang.String[][] attributes)
Handles ol tags found in the HTML source file. |
void |
handleTag_optgroup(java.lang.String[][] attributes)
Handles optgroup tags found in the HTML source file. |
void |
handleTag_option(java.lang.String[][] attributes)
Handles option tags found in the HTML source file. |
void |
handleTag_p(java.lang.String[][] attributes)
Handles p tags found in the HTML source file. |
void |
handleTag_param(java.lang.String[][] attributes)
Handles param tags found in the HTML source file. |
void |
handleTag_pre(java.lang.String[][] attributes)
Handles pre tags found in the HTML source file. |
void |
handleTag_s(java.lang.String[][] attributes)
Handles s tags found in the HTML source file. |
void |
handleTag_samp(java.lang.String[][] attributes)
Handles samp tags found in the HTML source file. |
void |
handleTag_script(java.lang.String[][] attributes)
Handles script tags found in the HTML source file. |
void |
handleTag_select(java.lang.String[][] attributes)
Handles select tags found in the HTML source file. |
void |
handleTag_small(java.lang.String[][] attributes)
Handles small tags found in the HTML source file. |
void |
handleTag_span(java.lang.String[][] attributes)
Handles span tags found in the HTML source file. |
void |
handleTag_strike(java.lang.String[][] attributes)
Handles strike tags found in the HTML source file. |
void |
handleTag_strong(java.lang.String[][] attributes)
Handles strong tags found in the HTML source file. |
void |
handleTag_style(java.lang.String[][] attributes)
Handles style tags found in the HTML source file. |
void |
handleTag_sub(java.lang.String[][] attributes)
Handles sub tags found in the HTML source file. |
void |
handleTag_sup(java.lang.String[][] attributes)
Handles sup tags found in the HTML source file. |
void |
handleTag_table(java.lang.String[][] attributes)
Handles table tags found in the HTML source file. |
void |
handleTag_tbody(java.lang.String[][] attributes)
Handles tbody tags found in the HTML source file. |
void |
handleTag_td(java.lang.String[][] attributes)
Handles td tags found in the HTML source file. |
void |
handleTag_textarea(java.lang.String[][] attributes)
Handles textarea tags found in the HTML source file. |
void |
handleTag_tfoot(java.lang.String[][] attributes)
Handles tfoot tags found in the HTML source file. |
void |
handleTag_th(java.lang.String[][] attributes)
Handles th tags found in the HTML source file. |
void |
handleTag_thead(java.lang.String[][] attributes)
Handles thead tags found in the HTML source file. |
void |
handleTag_title(java.lang.String[][] attributes)
Handles title tags found in the HTML source file. |
void |
handleTag_tr(java.lang.String[][] attributes)
Handles tr tags found in the HTML source file. |
void |
handleTag_tt(java.lang.String[][] attributes)
Handles tt tags found in the HTML source file. |
void |
handleTag_u(java.lang.String[][] attributes)
Handles u tags found in the HTML source file. |
void |
handleTag_ul(java.lang.String[][] attributes)
Handles ul tags found in the HTML source file. |
void |
handleTag_var(java.lang.String[][] attributes)
Handles var tags found in the HTML source file. |
protected void |
handleTag(java.lang.String[][] attributes)
Determines and passes to control to the appropriate handleTag_XXX method to process the tag represented by the
specified attributes. |
java.lang.String |
handleText(java.lang.String[][] attributes)
Handles the text between a start and end tag. |
void |
handleUnclosedFormattedTextTags(java.lang.String[][] attributes)
Attempts to handle a missing end tag of any FormattedText
objects. |
boolean |
handleUnclosedTag_li(java.lang.String[][] attributes)
Attempts to handle a missing </li> tag. |
boolean |
handleUnclosedTag_option(java.lang.String[][] attributes)
Attempts to handle a missing </option> tag. |
boolean |
handleUnclosedTag_p(java.lang.String[][] attributes)
Attempts to handle a missing </p> tag. |
protected void |
log(java.lang.String msg)
Logs a message to the ServletContext, if logging is
enabled. |
protected void |
log(java.lang.String msg,
HTML html)
Logs a message and an HTML object to the ServletContext. |
protected void |
log(java.lang.String part1,
java.lang.String part2)
Logs a message to the ServletContext. |
protected void |
log(java.lang.String msg,
java.lang.String[][] attributes)
Logs a message and set of attributes to the ServletContext. |
protected void |
log(java.lang.String part1,
java.lang.String part2,
java.lang.String part3)
Logs a message to the ServletContext. |
protected void |
log(java.lang.String part1,
java.lang.String part2,
java.lang.String part3,
java.lang.Class part4)
Logs a message to the ServletContext. |
protected void |
log(java.lang.Throwable t)
Logs a stack trace to the ServletContext. |
protected static void |
modifyLineBreaks(Tag tag,
boolean before,
boolean beforeContent,
boolean after,
boolean afterContent)
Convenience method to allow custom modification of tag line breaks. |
protected Container |
popCurrentContainer()
Removes the current container from the top of the stack. |
protected void |
postProcessDocument(Paje document)
Called immediately after all tags have been added to the document. |
protected HTML |
postProcessTag(HTML tag)
Called immediately before adding the tag to the document, but after any field or id specific processing. |
void |
setLogging(javax.servlet.ServletContext context)
Turns on debug logging. |
PajeTemplate |
setSuppressWarning(boolean on)
Allows the suppression of the JavaScript alert warning in the generated document warning of parser errors. |
protected PajeTemplateWarning |
setWarning(java.lang.String message,
java.lang.String[][] attributes)
Adds a warning message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PajeTemplate()
Paje instances.
public PajeTemplate(java.lang.Class pajeClass)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
Paje sub-class.
pajeClass - the Paje sub-class from which new instances will be returned.
java.lang.IllegalAccessException - if the specified class is not accesible.
java.lang.InstantiationException - if the specified class is an interface or an abstract class.| Method Detail |
public final Paje generate(PajeParser parser)
throws java.io.IOException
parser - the parser that will read the source HTML file.
java.io.IOException - if an I/O exception occurs whilst generating the Paje.
public final Paje generate(PajeParser parser,
Paje document)
throws java.io.IOException
parser - the parser that will read the source HTML file.document - the base document to which the template contents will be
added.
java.io.IOException - if an I/O exception occurs whilst generating the Paje.public PajeTemplateWarning getWarning()
PajeTemplateWarning.getNextWarning() method.
public void handleTag_a(java.lang.String[][] attributes)
a tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_applet(java.lang.String[][] attributes)
applet tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_area(java.lang.String[][] attributes)
area tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_b(java.lang.String[][] attributes)
b tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_base(java.lang.String[][] attributes)
base tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_big(java.lang.String[][] attributes)
big tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_body(java.lang.String[][] attributes)
body tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_br(java.lang.String[][] attributes)
br tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_center(java.lang.String[][] attributes)
center tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_cite(java.lang.String[][] attributes)
cite tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_code(java.lang.String[][] attributes)
code tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_dfn(java.lang.String[][] attributes)
dfn tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_div(java.lang.String[][] attributes)
div tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_em(java.lang.String[][] attributes)
em tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_embed(java.lang.String[][] attributes)
embed tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_font(java.lang.String[][] attributes)
font tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_form(java.lang.String[][] attributes)
form tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_frame(java.lang.String[][] attributes)
frame tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_frameset(java.lang.String[][] attributes)
frameset tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_h1(java.lang.String[][] attributes)
h1 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_h2(java.lang.String[][] attributes)
h2 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_h3(java.lang.String[][] attributes)
h3 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_h4(java.lang.String[][] attributes)
h4 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_h5(java.lang.String[][] attributes)
h5 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_h6(java.lang.String[][] attributes)
h6 tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_head(java.lang.String[][] attributes)
head tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_hr(java.lang.String[][] attributes)
hr tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_html(java.lang.String[][] attributes)
html tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_i(java.lang.String[][] attributes)
i tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_iframe(java.lang.String[][] attributes)
iframe tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_img(java.lang.String[][] attributes)
img tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
public void handleTag_input(java.lang.String[][] attributes)
throws java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
handleTag(java.lang.String[][]) to determines and pass to control to the
appropriate handleTag_input_XXX method to process the
input tag represented by the specified attributes.
attributes - the array of attributes from which the input tag will be
constructed.
java.lang.IllegalAccessException - if the specified class is not accesible.
java.lang.NoSuchMethodException - if no method exists to handle the input type.
java.lang.reflect.InvocationTargetException - if an exception is thrown creating the tag instance.public void handleTag_input_button(java.lang.String[][] attributes)
input button tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_checkbox(java.lang.String[][] attributes)
input checkbox tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_file(java.lang.String[][] attributes)
input file tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_hidden(java.lang.String[][] attributes)
input hidden tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_image(java.lang.String[][] attributes)
input image tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_password(java.lang.String[][] attributes)
input password tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_radio(java.lang.String[][] attributes)
input radio tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_reset(java.lang.String[][] attributes)
input reset tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_submit(java.lang.String[][] attributes)
input submit tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_input_text(java.lang.String[][] attributes)
input text tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_kbd(java.lang.String[][] attributes)
kbd tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_label(java.lang.String[][] attributes)
label tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_li(java.lang.String[][] attributes)
li tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_link(java.lang.String[][] attributes)
link tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_map(java.lang.String[][] attributes)
map tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_meta(java.lang.String[][] attributes)
meta tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_nobr(java.lang.String[][] attributes)
nobr tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_noembed(java.lang.String[][] attributes)
embed tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_noframes(java.lang.String[][] attributes)
noframes tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_noscript(java.lang.String[][] attributes)
noscript tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_object(java.lang.String[][] attributes)
object tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_ol(java.lang.String[][] attributes)
ol tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_optgroup(java.lang.String[][] attributes)
optgroup tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_option(java.lang.String[][] attributes)
option tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_p(java.lang.String[][] attributes)
p tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_param(java.lang.String[][] attributes)
param tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_pre(java.lang.String[][] attributes)
pre tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_s(java.lang.String[][] attributes)
s tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_samp(java.lang.String[][] attributes)
samp tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_script(java.lang.String[][] attributes)
script tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_select(java.lang.String[][] attributes)
select tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_small(java.lang.String[][] attributes)
small tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_span(java.lang.String[][] attributes)
span tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_strike(java.lang.String[][] attributes)
strike tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_strong(java.lang.String[][] attributes)
strong tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_style(java.lang.String[][] attributes)
style tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_sub(java.lang.String[][] attributes)
sub tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_sup(java.lang.String[][] attributes)
sup tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_table(java.lang.String[][] attributes)
table tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_tbody(java.lang.String[][] attributes)
tbody tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_td(java.lang.String[][] attributes)
td tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_textarea(java.lang.String[][] attributes)
textarea tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.public void handleTag_tfoot(java.lang.String[][] attributes)
tfoot tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_th(java.lang.String[][] attributes)
th tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_thead(java.lang.String[][] attributes)
thead tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_title(java.lang.String[][] attributes)
title tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_tr(java.lang.String[][] attributes)
tr tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_tt(java.lang.String[][] attributes)
tt tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_u(java.lang.String[][] attributes)
u tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_ul(java.lang.String[][] attributes)
ul tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public void handleTag_var(java.lang.String[][] attributes)
var tags found in the HTML source file.
attributes - the array of attributes from which the tag will be
constructed.
TagException - if an error is encountered constructing the tag.public java.lang.String handleText(java.lang.String[][] attributes)
attributes - the array of attributes from which the tag will be
constructed.
handleTag_option(java.lang.String[][]),
handleTag_title(java.lang.String[][])public boolean handleUnclosedTag_li(java.lang.String[][] attributes)
attributes - the array of attributes from the tag about to be constructed.
public void handleUnclosedFormattedTextTags(java.lang.String[][] attributes)
FormattedText
objects.
attributes - the array of attributes from the tag about to be constructed.public boolean handleUnclosedTag_option(java.lang.String[][] attributes)
attributes - the array of attributes from the tag about to be constructed.
public boolean handleUnclosedTag_p(java.lang.String[][] attributes)
attributes - the array of attributes from the tag about to be constructed.
public void setLogging(javax.servlet.ServletContext context)
context - the context to which messages will be logged. If null, debug
logging is turned off.public PajeTemplate setSuppressWarning(boolean on)
on - true if the warning is to be suppressed, or false if it is to
be generated (the default).
protected void addToContainer(HTML html)
html - the HTML object to be added to the current container.
protected void addToContainer(HTML html,
boolean push)
html - the HTML object to be added to the current container.push - if true, and the HTML object is an instance of Container, the Container will be pushed on to the Container
stack.protected void addToContainer(java.lang.String text)
PlainText (ie
with no character encoding).
text - the text to be added to the current container.protected void clearWarnings()
generate(org.pajes.html.PajeParser).
protected void dumpAttributes(java.lang.String[][] attributes)
System.out.
attributes - the array of attributes to be dumped.
protected int getAttributeIndex(java.lang.String[][] attributes,
java.lang.String name)
attributes - The array of attributes to be searched.name - The attribute name to be located.
protected java.lang.String getAttributeValue(java.lang.String[][] attributes,
java.lang.String name)
attributes - The array of attributes to be searched.name - The attribute name to be located.
protected Container getCurrentContainer()
protected Form getCurrentForm()
<form> tag has not been parsed, or the
</form> tag has been processed,
null will be returned.protected void handleEmptyTag(java.lang.String[][] attributes)
attributes - the array of attributes from which the tag was constructed.protected void handleTag(java.lang.String[][] attributes)
handleTag_XXX method to process the tag represented by the
specified attributes.
attributes - the array of attributes from which the tag will be
constructed.protected void log(java.lang.String msg)
ServletContext, if logging is
enabled.
msg - the message.
protected void log(java.lang.String msg,
HTML html)
ServletContext.
msg - the message.html - the object to be logged.
protected void log(java.lang.String part1,
java.lang.String part2)
ServletContext.
part1 - Part 1 of the message.part2 - Part 2 of the message.
protected void log(java.lang.String part1,
java.lang.String part2,
java.lang.String part3)
ServletContext.
part1 - Part 1 of the message.part2 - Part 2 of the message.part3 - Part 3 of the message.
protected void log(java.lang.String part1,
java.lang.String part2,
java.lang.String part3,
java.lang.Class part4)
ServletContext.
part1 - Part 1 of the message.part2 - Part 2 of the message.part3 - Part 3 of the message.part4 - Part 4 of the message.
protected void log(java.lang.String msg,
java.lang.String[][] attributes)
ServletContext.
msg - the message.attributes - the array of attributes.protected void log(java.lang.Throwable t)
ServletContext.
t - the Throwable instance.protected Container popCurrentContainer()
protected void postProcessDocument(Paje document)
Sub-classes may over-ride this method to do document-specific processing.
This implementation verifies that the source HTML file contains all
elements that have been specifically identified with constants in this
class. Therefore, the sub-class should call
super.postProcessDocument(document) as the first thing in
any over-ride method.
document - the Paje instance that will be cloned to be returned when
requested.protected HTML postProcessTag(HTML tag)
Sub-classes may over-ride this method to do document-specific tag processing, such as replacing a generic InputString instance with a specific sub-class to do correct validation. The default implementation returns the tag with no modification.
tag - the HTML instance that will be added to the document.
protected PajeTemplateWarning setWarning(java.lang.String message,
java.lang.String[][] attributes)
message - the message text.attributes - the array of attributes that make up tthe tag being processed.
protected static void modifyLineBreaks(Tag tag,
boolean before,
boolean beforeContent,
boolean after,
boolean afterContent)
tag - the tag to be modified.before - true if a line feed should be written before the tag.beforeContent - true if a line feed should be written before the tag content.after - true if a line feed should be written after the tag.afterContent - true if a line feed should be written after the tag content.
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||