public class HtmlParameterPageWriter extends ParameterPageWriter
The following is an outline for the parameter page generated: <head> // generated through the writeHead() method <link> // points to the location of the style sheet </head> <body> // generated through the writeBody() method <div> // generated through the writeTableTitle() method </div> <form> // generated through the writeBodyBody() method in the superclass <table> <td> // display parameter titles, </td> <td> <div> // display parameter values or inputbox, </div> </td> // ... Repeat for each parameter </table> <input type="submit"> // button to submit the form <input type="reset"> // button to reset the form </form> </body>
CssHtmlParameterPageWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_DATE_FORMAT |
static java.lang.String |
DEFAULT_TIMESTAMP_FORMAT |
protected quadbase.common.param.HtmlWriter |
html
the underlying HTML writer
|
protected java.lang.String |
serverName
name of the server
|
protected java.lang.String |
servletDirectory
path to the servlet classes (ex.
|
protected java.lang.String |
servletName
name of the servlet
|
protected int |
servletRunnerPort
the port the servlets container is running on
|
alignment, backgroundColor, backgroundImage, dateParameterCalendar, dateParameterCalendarDatepicker, dateParameterSelection, dateVariable, dateVariableDatepicker, dbInfo, docTitle, extraFormContent, footer, format, header, page, paramDateFormat, paramNameArr, paramPageExportFormats, paramPageLayout, paramPageResetEnabled, paramValueArr, securityLevel, tableBackgroundColor, tableBorderColor, tableBorderThickness, tableOuterBorderOnly, targetLoc, textColor, textFont, textSize, textStyle, titleText, titleTextColor, titleTextFont, titleTextSize, titleTextStyle
Constructor and Description |
---|
HtmlParameterPageWriter(ParameterPage page,
java.io.Writer out)
Allocates a HtmlParameterPageWriter writing to a specified output with specified
ParameterPage content.
|
Modifier and Type | Method and Description |
---|---|
boolean[] |
getHiddenParameters()
Gets whether each parameter is a hidden parameter with value of the parameter's default
value.
|
protected quadbase.common.param.HtmlWriter |
getHtmlWriter()
Gets the underlying HTML Writer.
|
java.lang.String[] |
getParamDisplayNames()
Gets the array of parameter display names.
|
protected java.lang.String |
getServletName()
Gets the full address of the servlet extracted from the ParameterPage.
|
protected void |
printCalendarJavascript(java.lang.String name,
Param param) |
protected void |
printDateVariableJavascript(java.lang.String name) |
void |
setHiddenParameters(boolean[] state)
Sets whether each parameter is a hidden parameter with value of the parameter's default
value.
|
void |
setHiddenParameterValues(java.lang.Object[] val)
Sets whether each parameter is a hidden parameter with specific value The order of the
Object[] is according to getParamDisplayNames, or the order in which the parameters appear
when using report.getAllParameters().get(i).
|
void |
setJavaScriptLibPath(java.lang.String javaScriptLibPath) |
void |
setParamDisplayNames(java.lang.String[] names)
Sets the array of parameter display names.
|
void |
writeBody()
Writes the content between the <body> and </body> tags (writes tags as well) of
the HTML parameter page and centers it on the page.
|
void |
writeBodyBody()
Writes only the main components (table title, form, parameter table, form buttons) of the
contents inside the <body> and </body> tags (does not write tags) of the HTML
parameter page.
|
protected void |
writeBodyFooter()
Writes the conclusion/footer component (the String footer that is set using
ParameterPage.setFooter()) of the contents inside the <body> and </body> tags of
the HTML parameter page.
|
protected void |
writeBodyHeader()
Writes the preface/header component (the String header that is set using
ParameterPage.setHeader()) of the contents inside the <body> and </body> tags of
the HTML parameter page.
|
protected void |
writeFormButtons()
Writes the form buttons (submit and reset).
|
void |
writeHead()
Writes only the content between the <head> and </head> tags of the parameter
page.
|
protected void |
writeHeadJavascript() |
protected void |
writeHiddenParamValue(java.lang.String name,
java.lang.String value)
Writes a hidden parameter value component.
|
void |
writePage()
Writes the entire parameter page to the output writer in HTML format.
|
protected void |
writePageExportFormats()
Writes the page exporting formats selection list.
|
protected void |
writeParamName(java.lang.String paramName)
Writes a parameter name component inside the parameter table.
|
void |
writeParamTable()
Writes the HTML code for the parameter table.
|
void |
writeParamTable(boolean getDistinctValue) |
protected void |
writeParamTableCategory(java.lang.String paramName,
java.lang.String tdAttributes)
Writes a parameter table category component inside the parameter table enclosed in <TD>
and </TD> tags.
|
protected void |
writeParamTableCloseTag()
Writes the </TABLE> tag for the parameter table.
|
protected void |
writeParamTableMain(java.lang.String tableDataBorderColorStr,
boolean getDistinctValue)
Writes a part of the parameter table for main report parameters.
|
protected void |
writeParamTableOpenTag()
Writes the <TABLE> tag for the parameter table.
|
protected void |
writeParamTableValue(java.lang.String name,
java.lang.String value,
java.lang.String tdAttributes)
Writes a parameter table value component inside the parameter table enclosed in <TD>
and </TD> tags.
|
protected void |
writeParamTableValue(java.lang.String name,
java.lang.String value,
java.lang.String tdAttributes,
Param param)
Writes a parameter table value component inside the parameter table enclosed in <TD>
and </TD> tags.
|
protected void |
writeParamTableValues(java.lang.String name,
java.lang.String selectAttributes,
java.util.Vector values,
java.lang.String paramValue,
java.lang.String tdAttributes)
Writes a parameter table values component inside the parameter table enclosed in <TD>
and </TD> tags.
|
protected void |
writeParamValue(java.lang.String name,
java.lang.String value)
Writes a parameter value component.
|
protected void |
writeParamValue(java.lang.String name,
java.lang.String value,
Param param)
Writes a parameter value component.
|
protected void |
writeParamValueDate(java.lang.String name,
java.lang.String value,
Param param)
Writes the parameter value component.
|
protected void |
writeParamValues(java.lang.String name,
java.lang.String attributes,
java.util.Vector values,
java.lang.String paramValue)
Writes a parameter values component.
|
protected void |
writeParamValuesOptions(java.util.Vector values,
java.lang.String paramValue) |
protected quadbase.common.param.CompleteParamPrompt |
writeParamValuesOptionsYUI(java.util.Vector values,
java.lang.String paramValue) |
protected void |
writeResetButton()
Writes the reset button.
|
protected void |
writeSubmitButton()
Writes the submit button.
|
void |
writeTableTitle()
Writes the title of the parameter table.
|
refresh
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
public static final java.lang.String DEFAULT_TIMESTAMP_FORMAT
public static final java.lang.String DEFAULT_DATE_FORMAT
protected java.lang.String servletName
protected java.lang.String serverName
protected java.lang.String servletDirectory
protected int servletRunnerPort
protected quadbase.common.param.HtmlWriter html
public HtmlParameterPageWriter(ParameterPage page, java.io.Writer out)
page
- the ParameterPage to writeout
- the output to write topublic void writePage() throws java.io.IOException
writePage
in class ParameterPageWriter
java.io.IOException
public void writeBody()
public void writeBodyBody()
public void writeTableTitle()
public void writeHead()
public void writeParamTable()
public void writeParamTable(boolean getDistinctValue)
protected void writeParamTableMain(java.lang.String tableDataBorderColorStr, boolean getDistinctValue)
protected void writeBodyHeader()
protected void writeBodyFooter()
protected void writeParamTableOpenTag()
protected void writeParamTableCloseTag()
protected void writeParamTableCategory(java.lang.String paramName, java.lang.String tdAttributes)
paramName
- the name of the parametertdAttributes
- the attributes for the <TD> tagprotected void writeParamName(java.lang.String paramName)
paramName
- the name of the parameterprotected void writeParamTableValues(java.lang.String name, java.lang.String selectAttributes, java.util.Vector values, java.lang.String paramValue, java.lang.String tdAttributes)
name
- the name of the INPUT elementselectAttributes
- the attributes for the selection listvalues
- the list of possible values that the parameter can takeparamValue
- the selected parameter valuetdAttributes
- the attributes for the <TD> tagprotected void writeParamTableValue(java.lang.String name, java.lang.String value, java.lang.String tdAttributes)
name
- the name of the INPUT elementvalue
- the default value of the text boxtdAttributes
- the attributes for the <TD> tagprotected void writeParamTableValue(java.lang.String name, java.lang.String value, java.lang.String tdAttributes, Param param)
name
- the name of the INPUT elementvalue
- the default value of the text boxtdAttributes
- the attributes for the <TD> tagparam
- the Param object that represents a parameterprotected void writeParamValue(java.lang.String name, java.lang.String value)
name
- the name of the INPUT elementvalue
- the default value of the text boxprotected void writeHiddenParamValue(java.lang.String name, java.lang.String value)
name
- the name of the INPUT elementvalue
- the default value of the parameterprotected void writeParamValueDate(java.lang.String name, java.lang.String value, Param param)
name
- the name of the INPUT elementvalue
- the default value of the text boxparam
- the parameter that holds information about custom date format if applicable.protected void writeParamValue(java.lang.String name, java.lang.String value, Param param)
name
- the name of the INPUT elementvalue
- the default value of the text boxparam
- the Param object that represents a query parameterprotected void writeParamValues(java.lang.String name, java.lang.String attributes, java.util.Vector values, java.lang.String paramValue)
name
- the name of the SELECT elementattributes
- the String of attributes to be included in the SELECT element (ex. <SELECT
attributes></SELECT>values
- a vector of values to be included in the options of the select listparamValue
- the value to be selected, if it exists in the VALUES argumentprotected void writeParamValuesOptions(java.util.Vector values, java.lang.String paramValue)
protected quadbase.common.param.CompleteParamPrompt writeParamValuesOptionsYUI(java.util.Vector values, java.lang.String paramValue)
protected void writePageExportFormats()
protected void writeFormButtons()
protected void writeSubmitButton()
protected void writeResetButton()
protected void printDateVariableJavascript(java.lang.String name)
protected void printCalendarJavascript(java.lang.String name, Param param)
protected void writeHeadJavascript()
public java.lang.String[] getParamDisplayNames()
public void setParamDisplayNames(java.lang.String[] names)
public void setJavaScriptLibPath(java.lang.String javaScriptLibPath)
public void setHiddenParameterValues(java.lang.Object[] val)
the
- i'th parameter valueprotected java.lang.String getServletName()
protected quadbase.common.param.HtmlWriter getHtmlWriter()
public boolean[] getHiddenParameters()
public void setHiddenParameters(boolean[] state)
the
- i'th parameter is hidden if state[i] = true