|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.htmlb.rendering.PageContext
Copyright 2004 SAP AG
| Nested Class Summary | |
protected class |
PageContext.UnbufferedWriter
Set the has content padding of the tray |
| Field Summary | |
protected Document |
document
|
protected MobileWmlCard |
hiddenCard
|
protected HashMap |
newParamList
|
protected HashMap |
oldParamList
|
protected Hashtable |
parametersMultiPart
|
| Fields inherited from interface com.sapportals.htmlb.rendering.IPageContext |
HTMLB_ACTIONURL, HTMLB_HASCONTENTPADDING, HTMLB_JSPATH, HTMLB_LOCALE, HTMLB_MIMEPATH, HTMLB_RELAXDOMAIN, HTMLB_SEC508, HTMLB_STYLEPATH, HTMLB_TRAYDESIGN |
| Constructor Summary | |
PageContext(Object request,
Object response)
|
|
| Method Summary | |
void |
addPerfCounter(String line)
adds performance counters written a comments in the HTML source |
protected String |
attemptUTF8Encoding(String value)
add the java script |
protected void |
checkForCurrentEvent()
|
protected void |
checkFormElements()
|
void |
cleanUp()
deletes temporary file of mime multipart postings. |
Document |
createDocument(String title)
create a new document. |
Form |
createForm()
create a new form. |
Form |
createFormDocument(String title)
create a new document and automatically create a form. |
protected void |
detectUserAgent(HttpServletRequest httpServletRequest)
|
void |
endDocument()
end the generated output. |
void |
endDocumentBody()
end the body section of the generated output. |
void |
endDocumentHead()
close the head section of the produced HTML. |
void |
flush()
|
String |
getActionUrl()
get the local or absolute URL path where the form should be posted if not already set |
Object |
getAttribute(String key)
get an attribute from the current session |
BrowserType |
getBrowserId()
get the BrowserType for the recognized browser/user agent |
ClassLoader |
getClassLoader()
Get the class loader assigned to this context. |
ClientInfo |
getClientInfo()
|
Component |
getComponentForId(String elementId)
returns a reconstructed component for a given id. |
String |
getComponentIdForLabel(String id)
|
Component[] |
getComponents()
returns all the components that were rebuild |
Event |
getCurrentEvent()
return the event from the current request. |
Form |
getCurrentForm()
get the current form |
String |
getCurrentFormId()
get the ID of the current form (HTML!!!) |
AbstractDataType |
getDataForComponentId(String elementId)
get the user input for a given id. |
AbstractDataType |
getDataForComponentId(String tableId,
String elementId,
int row)
get the user input for a given id. |
String |
getDevice()
|
Document |
getDocument()
gets the current document |
boolean |
getDomainRelaxation()
Get the flag for domain relaxation. |
IFileParam |
getFileParam(String name)
|
boolean |
getHasAdvancedAlignment()
|
MobileWmlCard |
getHiddenCard()
|
HttpServletRequest |
getHttpServletRequest()
|
HttpServletResponse |
getHttpServletResponse()
|
boolean |
getIs508()
|
boolean |
getIsRTL()
|
String |
getJavascriptPath()
get the URL path where the Javascript library files can be found. |
String |
getJavascriptUrl()
get the full URL for the JavaScript library file for the current user agent. |
Locale |
getLocale()
Returns the preferred Locale that the client will accept content in, based on the Accept-Language header. |
Enumeration |
getLocales()
Returns an Enumeration of Locale
objects indicating, in decreasing order starting with the
preferred locale, the locales that are acceptable to the
client based on the Accept-Language header.
|
com.sap.tc.logging.Location |
getLogLocation()
returns the Location object used for logging and tracing |
String |
getMimePath()
get the local or absolute URL path where the mimes for the current theme can be found. |
Form |
getOldForm()
get the reconstructed form from a request |
String |
getParameter(String name)
Returns the value of a request parameter as a String, or null if the parameter does not exist. |
String |
getParameterForId(String elementId)
gets the raw parameter value for the component with the specified id. |
Enumeration |
getParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request. |
protected Hashtable |
getParametersMultiPart()
|
String[] |
getParameterValues(String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist. |
String[] |
getParameterValuesForId(String elementId)
gets the raw parameter values for the component with the specified id. |
String |
getParamIdForComponent(Component c)
get a generated unique ID for a component. |
String |
getParamIdForComponent(String componentId)
get the generated unique ID for a component. |
HashMap |
getParamList()
Session: Session based storage for HTMLB context information only needed if isUsingSession will return true |
Object |
getParent()
Get the pagecontext's parent e.g. |
Object |
getRequest()
get the request object for the current context, e.g. |
ResourceBundle |
getResourceBundle(String baseName,
Locale locale)
get a ResourceBundle for locale specific texts. |
Object |
getResponse()
get the response object for the current context, e.g. |
String |
getSpaceGif()
|
String |
getStylePath()
get the local or absolute URL path where the styles for the current theme can be found. |
HashSet |
getStylesheets()
returns the required stylesheets |
String |
getStylesheetUrl()
get the full URL for the CSS file for the current user agent. |
Component |
getTableComponentForId(String tableId,
String elementId,
int row)
get a reconstructed component for a given id. |
TrayDesign |
getTrayDesign()
returns a object describing the traytype the page is contained |
String |
getUrMapiJavascriptUrl()
|
String |
getUrMessageBundleUrl()
|
String |
getUrPopupJavascriptUrl()
|
protected boolean |
getUTF8Encoding()
|
Writer |
getWriter()
get the java.io.Writer for output operations |
protected void |
init(Object request,
Object response)
|
protected void |
initMultiPartMime()
|
boolean |
isFileParam(String name)
|
boolean |
isHasContentPadding()
|
protected boolean |
isMultiPartMime()
|
boolean |
isSingleValueParameter(String name)
Returns if a parameter has only a single value |
boolean |
isUsingSession()
Session: used by the control renderers (Form & Inputfield) to find out where to put their data |
void |
pop()
temporary solution for mixed-mode, i.e. creation of component/container structures and raw output. |
void |
push(Container container)
temporary solution for mixed-mode, i.e. creation of component/container structures and raw output. |
protected boolean |
queryRTL()
|
protected void |
readOldParamList(String formId)
|
void |
rebuildComponents()
rebuilds all the components that were registered at rendering time |
void |
registerStylesheet(String key)
register the required style sheets |
void |
render()
render the complete document |
void |
render(Component component)
render a single component. |
void |
render(Component component,
int selector)
render an aspect of a single component. |
void |
renderJavascriptInterface(Component component,
String generatedId)
render Javascript interface of component. |
boolean |
requiresSection508Rendering()
checks if additional information according to Section 508 should be rendered in the output stream. |
void |
setActionUrl(String actionUrl)
set the URL path where form should be poset |
void |
setAdvancedAlignment(boolean advancedAlignment)
aligment compatibility mode default value:false |
void |
setAttribute(String key,
Object value)
set an attribute in the current session |
void |
setBrowserId(BrowserType browserId)
|
void |
setClassLoader(ClassLoader classLoader)
Set the class loader for this context. |
void |
setCurrentEvent(Event currentEvent)
|
void |
setCurrentForm(Form form)
set the current form. |
void |
setDocumentId(String documentId)
set the ID of the current document |
void |
setDomainRelaxation(boolean relaxDomain)
Set the domain relaxation for the portal. |
void |
setFormDefaults(Form form)
sets the defaults values for the form within the current context. |
void |
setHasContentPadding(boolean b)
|
protected void |
setHttpServletRequest(HttpServletRequest httpServletRequest)
|
protected void |
setHttpServletResponse(HttpServletResponse httpServletResponse)
|
void |
setJavascriptPath(String javascriptPath)
set the URL path where the JavaScript libraries can be found |
void |
setLocale(Locale locale)
sets the locale |
void |
setMessageBarAtBodyEnd(boolean messageBarAtBodyEnd)
sets whether messageBar should be renderted at body start or end. |
void |
setMimePath(String mimePath)
set the URL path where the mimes can be found |
protected void |
setMultiPartMime(boolean multiPartMime)
|
void |
setParent(Object parent)
Set the pagecontext's parent e.g. |
void |
setRequest(Object request)
set the request object. |
void |
setResponse(Object response)
set the response object. |
void |
setRTL(boolean rtl)
|
void |
setSection508Rendering(boolean requires508)
sets if additional information according to Section 508 should be rendered in the output stream. |
void |
setStylePath(String stylePath)
set the URL path where the mimes can be found |
void |
setTrayDesign(TrayDesign trayDesign)
Set the traytype for the right background style of the body |
void |
setUsingSession(boolean useSession)
Session: if an application want to use session state instead of persisting all HTMLB context in the HTML page |
protected void |
setUTF8Encoding(boolean encode)
|
void |
setWriter(Writer writer)
set the Writer to which output will be send. |
void |
startDocument()
start a new document. |
void |
startDocumentBody()
begin the body section of the generated output. |
void |
startDocumentHead(String title)
begin the header of the document |
void |
storeParametersInSession(String formId)
Session: called by the form renderer when it has finished rendering it's content Now you can be sure that all needed context info is in the ParamList |
void |
write(int i)
write the integer value to the designated writer for the response |
void |
write(String text)
write a String to the designated writer for the response |
void |
writeEncoded(String text)
write a String to the designated writer for the response but encode critical characters, e.g. '<' as '<' |
void |
writeHeadBegin(String text)
|
void |
writeHeadIncludes()
write the required head includes to the output This will insert JavaScript and Stylesheet references. |
void |
writeHeadIncludes(String text)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Document document
protected Hashtable parametersMultiPart
protected MobileWmlCard hiddenCard
protected HashMap newParamList
protected HashMap oldParamList
| Constructor Detail |
public PageContext(Object request,
Object response)
| Method Detail |
protected void init(Object request,
Object response)
public Component getComponentForId(String elementId)
IPageContextgetDataForComponentId
getComponentForId in interface IPageContextelementId - the Id for the component
IPageContext.getDataForComponentId(String)
public Component getTableComponentForId(String tableId,
String elementId,
int row)
IPageContext
getTableComponentForId in interface IPageContextelementId - the name given to the component by the userrow - table row
public String getParameterForId(String elementId)
IPageContextgetDataForComponentId.
getParameterForId in interface IPageContextelementId - the Id for the component
IPageContext.getDataForComponentId(String)public String[] getParameterValuesForId(String elementId)
IPageContextgetDataForComponentId. As of release
1.0 the only component that can return values is
the ListBox.
getParameterValuesForId in interface IPageContextelementId - the Id for the component
IPageContext.getDataForComponentId(String)public AbstractDataType getDataForComponentId(String elementId)
IPageContext
getDataForComponentId in interface IPageContextelementId - the Id for the component
public AbstractDataType getDataForComponentId(String tableId,
String elementId,
int row)
IPageContext
getDataForComponentId in interface IPageContextelementId - the Id for the componentpublic void cleanUp()
IPageContext
cleanUp in interface IPageContextprotected void checkForCurrentEvent()
protected void checkFormElements()
protected void detectUserAgent(HttpServletRequest httpServletRequest)
public void setCurrentEvent(Event currentEvent)
public Event getCurrentEvent()
IPageContext
getCurrentEvent in interface IPageContextprotected boolean isMultiPartMime()
protected void setMultiPartMime(boolean multiPartMime)
protected Hashtable getParametersMultiPart()
public Enumeration getParameterNames()
IPageContext
getParameterNames in interface IPageContextpublic String getParameter(String name)
IPageContextYou should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use getParameterValues(java.lang.String).
This method does not return values for Components since
component ids are encoded. Use getComponentForId or
getDataForComponentId for that case.
getParameter in interface IPageContextpublic String[] getParameterValues(String name)
IPageContext
getParameterValues in interface IPageContextname - a String containing the name of the
parameter whose value is requested
public boolean isFileParam(String name)
isFileParam in interface IPageContextpublic IFileParam getFileParam(String name)
getFileParam in interface IPageContextprotected void initMultiPartMime()
public boolean isSingleValueParameter(String name)
isSingleValueParameter in interface IPageContextpublic String getActionUrl()
IPageContext
getActionUrl in interface IPageContextpublic void setActionUrl(String actionUrl)
IPageContext
setActionUrl in interface IPageContextactionUrl - the Url for tha actionpublic String getMimePath()
IPageContext
getMimePath in interface IPageContextpublic void setMimePath(String mimePath)
IPageContext
setMimePath in interface IPageContextmimePath - the path for the mimespublic void setStylePath(String stylePath)
IPageContext
setStylePath in interface IPageContextpublic String getStylePath()
IPageContext
getStylePath in interface IPageContextpublic String getJavascriptPath()
IPageContext
getJavascriptPath in interface IPageContextpublic void setJavascriptPath(String javascriptPath)
IPageContext
setJavascriptPath in interface IPageContextjavascriptPath - URL pathpublic String getSpaceGif()
public HttpServletRequest getHttpServletRequest()
protected void setHttpServletRequest(HttpServletRequest httpServletRequest)
public Object getRequest()
IPageContext
getRequest in interface IPageContextpublic void setRequest(Object request)
IPageContext
setRequest in interface IPageContextrequest - the request Objectpublic HttpServletResponse getHttpServletResponse()
protected void setHttpServletResponse(HttpServletResponse httpServletResponse)
public Object getResponse()
IPageContext
getResponse in interface IPageContextpublic void setResponse(Object response)
IPageContextImplementations for this method should always test if the passed parameter is null since IPageContext may be instantiated without a response object.
setResponse in interface IPageContextresponse - the response Objectpublic BrowserType getBrowserId()
IPageContext
getBrowserId in interface IPageContextpublic void setBrowserId(BrowserType browserId)
public Locale getLocale()
IPageContext
getLocale in interface IPageContextpublic void setLocale(Locale locale)
public Enumeration getLocales()
IPageContextEnumeration of Locale
objects indicating, in decreasing order starting with the
preferred locale, the locales that are acceptable to the
client based on the Accept-Language header.
If the client request doesn't provide an Accept-Language
header, this method returns an Enumeration containing one
Locale, the default locale for the server.
getLocales in interface IPageContextLocale
objects for the clientpublic Writer getWriter()
IPageContext
getWriter in interface IPageContextpublic void setWriter(Writer writer)
IPageContextinit method.
setWriter in interface IPageContextwriter - the Writer used for outputpublic void write(String text)
IPageContext
write in interface IPageContexttext - a String to writepublic void writeEncoded(String text)
IPageContext
writeEncoded in interface IPageContexttext - a String to writepublic void writeHeadBegin(String text)
writeHeadBegin in interface IPageContextpublic void writeHeadIncludes(String text)
writeHeadIncludes in interface IPageContextpublic void write(int i)
IPageContext
write in interface IPageContexti - a int whose value should be writtenpublic void push(Container container)
IPageContext
push in interface IPageContextcontainer - Container that should receive what's written.public void pop()
IPageContext
pop in interface IPageContextpublic void render()
render in interface IPageContextpublic void render(Component component)
IPageContext
render in interface IPageContextcomponent - the Component that should be rendered.
public void render(Component component,
int selector)
IPageContext
render in interface IPageContextcomponent - the Component that should be rendered.selector - a String indicating which part of the
Component should be rendered.
public void renderJavascriptInterface(Component component,
String generatedId)
IPageContext
renderJavascriptInterface in interface IPageContextcomponent - the Component that should be rendered.public String getJavascriptUrl()
IPageContext
getJavascriptUrl in interface IPageContextpublic String getStylesheetUrl()
IPageContext
getStylesheetUrl in interface IPageContextpublic Document createDocument(String title)
createDocument in interface IPageContexttitle - the title for the new documentpublic Form createFormDocument(String title)
createFormDocument in interface IPageContexttitle - the title for the new documentpublic Form createForm()
createForm in interface IPageContextpublic void setFormDefaults(Form form)
IPageContext
setFormDefaults in interface IPageContextform - the formpublic boolean requiresSection508Rendering()
IPageContextSection 508 requires specific rendering functions that might not be sensible for non-disabled persons.
Basically if anything is to be rendered section 508 conform this means, that
requiresSection508Rendering in interface IPageContextpublic void setSection508Rendering(boolean requires508)
IPageContext
setSection508Rendering in interface IPageContextpublic String getParamIdForComponent(Component c)
getParamIdForComponent in interface IPageContextc - the component for which a unique ID is required
public String getParamIdForComponent(String componentId)
getParamIdForComponent in interface IPageContextpublic void startDocument()
IPageContext
startDocument in interface IPageContextpublic void startDocumentHead(String title)
IPageContext
startDocumentHead in interface IPageContexttitle - the Title for the pagepublic void writeHeadIncludes()
IPageContext
writeHeadIncludes in interface IPageContextpublic void endDocumentHead()
IPageContext
endDocumentHead in interface IPageContextpublic void setMessageBarAtBodyEnd(boolean messageBarAtBodyEnd)
IPageContext
setMessageBarAtBodyEnd in interface IPageContextpublic void startDocumentBody()
IPageContext
startDocumentBody in interface IPageContextpublic void endDocumentBody()
IPageContext
endDocumentBody in interface IPageContextpublic void endDocument()
IPageContext
endDocument in interface IPageContextpublic Document getDocument()
getDocument in interface IPageContextpublic void setDocumentId(String documentId)
documentId - the id of the current documentpublic String getCurrentFormId()
getCurrentFormId in interface IPageContextpublic Form getCurrentForm()
getCurrentForm in interface IPageContextpublic Form getOldForm()
getOldForm in interface IPageContextpublic void setCurrentForm(Form form)
setCurrentForm in interface IPageContextform - the current form
public void setAttribute(String key,
Object value)
setAttribute in interface IPageContextkey - the keyvalue - the value associated with this keypublic Object getAttribute(String key)
getAttribute in interface IPageContextkey - the key
public ResourceBundle getResourceBundle(String baseName,
Locale locale)
getResourceBundle in interface IPageContextbaseName - the baseName for the bundlelocale - the locale for the bundle or null
if the default locale from the request should
be used.
ResourceBundleprotected String attemptUTF8Encoding(String value)
protected void setUTF8Encoding(boolean encode)
protected boolean getUTF8Encoding()
public String getComponentIdForLabel(String id)
getComponentIdForLabel in interface IPageContextpublic ClientInfo getClientInfo()
getClientInfo in interface IPageContextpublic MobileWmlCard getHiddenCard()
getHiddenCard in interface IPageContextpublic String getUrMapiJavascriptUrl()
public String getUrPopupJavascriptUrl()
public String getUrMessageBundleUrl()
public boolean getIs508()
public ClassLoader getClassLoader()
getClassLoader in interface IPageContextpublic void setClassLoader(ClassLoader classLoader)
setClassLoader in interface IPageContextpublic boolean getDomainRelaxation()
IPageContext
getDomainRelaxation in interface IPageContextpublic void setDomainRelaxation(boolean relaxDomain)
IPageContext
setDomainRelaxation in interface IPageContextpublic HashMap getParamList()
IPageContext
getParamList in interface IPageContextpublic void setUsingSession(boolean useSession)
IPageContext
setUsingSession in interface IPageContextpublic boolean isUsingSession()
IPageContext
isUsingSession in interface IPageContextprotected void readOldParamList(String formId)
public void storeParametersInSession(String formId)
IPageContext
storeParametersInSession in interface IPageContextpublic Object getParent()
getParent in interface IPageContextpublic void setParent(Object parent)
setParent in interface IPageContextpublic void rebuildComponents()
IPageContext
rebuildComponents in interface IPageContextpublic Component[] getComponents()
IPageContext
getComponents in interface IPageContextpublic TrayDesign getTrayDesign()
getTrayDesign in interface IPageContextpublic void setTrayDesign(TrayDesign trayDesign)
setTrayDesign in interface IPageContexttrayDesign - TrayDesign the traydesignpublic void flush()
flush in interface IPageContextpublic void registerStylesheet(String key)
registerStylesheet in interface IPageContextpublic HashSet getStylesheets()
getStylesheets in interface IPageContextpublic boolean getIsRTL()
public void setRTL(boolean rtl)
setRTL in interface IPageContextprotected boolean queryRTL()
public com.sap.tc.logging.Location getLogLocation()
IPageContext
getLogLocation in interface IPageContextpublic String getDevice()
public boolean getHasAdvancedAlignment()
public void setAdvancedAlignment(boolean advancedAlignment)
IPageContext
setAdvancedAlignment in interface IPageContextadvancedAlignment - public void addPerfCounter(String line)
IPageContext
addPerfCounter in interface IPageContextpublic boolean isHasContentPadding()
isHasContentPadding in interface IPageContextpublic void setHasContentPadding(boolean b)
setHasContentPadding in interface IPageContext
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||