public class XHTMLPage extends AbstractContainer implements StreamablePage
Modifier and Type | Field and Description |
---|---|
protected Element |
body |
static String |
CLASS |
protected String |
contentType |
protected Document |
doc |
protected Element |
head |
protected String |
id |
components
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
LABELLEDBY
Constructor and Description |
---|
XHTMLPage()
creates a new empty XHTMLPage object
|
XHTMLPage(String resource)
creates a new XHTMLPage object from
a specified template source and builds the JDOM.
|
XHTMLPage(String file,
Resource resource)
creates a new XHTMLPage object from
a specified template source and builds the JDOM with specified
ResourceBundle
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String header,
Date value)
Set a header field in the response before writing the page.
|
void |
addHeader(String header,
int value)
Set a header field in the response before writing the page.
|
void |
addHeader(String header,
String value)
Set a header field in the response before writing the page.
|
Element |
getBody() |
Object |
getContent()
Returns null.
|
String |
getContentType()
Returns the content type of the page, for example "text/html".
|
Document |
getDocument() |
Element |
getHead() |
List<Pair<String,Object>> |
getHeaders()
Returns the list of http-response-headers to be set on the
HttpServletResponse |
String |
getTitle() |
void |
init(Document document) |
void |
output(Writer w) |
void |
setContent(Object o)
Does nothing.
|
void |
setContentType(String contentType) |
XHTMLPage |
setPage(String page) |
void |
setTitle(String title) |
String |
show()
method for rendering the component as string
|
add, get, getAll, getAll, getAllDeep, getByName, getComponents, getWithParent, init, remove, setBrowserMode, substitute
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, toggleClass, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addClass, clone, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getStyle, getViewMode, init, removeAttribute, removeClass, setActionListener, setAttribute, setClass, setId, setLabel, setName, setParent, setParentElement, setStyle, setViewMode, show, toggleClass, toString
public static final String CLASS
protected Document doc
protected String id
protected Element head
protected Element body
protected String contentType
public XHTMLPage()
public XHTMLPage(String resource)
public Document getDocument()
public void init(Document document)
public void setTitle(String title)
public String getTitle()
public void setContent(Object o)
setContent
in interface Component
setContent
in class AbstractComponent
o
- - any object where the string representation is used for renderingpublic Object getContent()
getContent
in interface Component
getContent
in class AbstractComponent
public String getContentType()
Page
getContentType
in interface Page
public void setContentType(String contentType)
public String show()
Component
public Element getBody()
public Element getHead()
public List<Pair<String,Object>> getHeaders()
Page
HttpServletResponse
getHeaders
in interface Page
String
, Date
or Integer
public void addHeader(String header, String value)
HttpServletResponse.setHeader(String, String)
will be used to set to the new value.header
- the name of the headervalue
- the header valuepublic void addHeader(String header, Date value)
HttpServletResponse.setDateHeader(String,long)
will be used to set to the new value.header
- the name of the headervalue
- the header valuepublic void addHeader(String header, int value)
HttpServletResponse.setIntHeader(String,int)
will be used to set to the new value.header
- the name of the headervalue
- the header valuepublic void output(Writer w)
output
in interface StreamablePage
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.