|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Title: IPageContext Description: Interface for PageContext classes This defines the interface for the PageContext, the central class for generating output. Actual instances for this interface should be generated using the RendererFactory class which can provide specific implementations depending on context.
Copyright 2004 SAP AG
| Field Summary | |
static String |
HTMLB_ACTIONURL
|
static String |
HTMLB_HASCONTENTPADDING
|
static String |
HTMLB_JSPATH
|
static String |
HTMLB_LOCALE
|
static String |
HTMLB_MIMEPATH
|
static String |
HTMLB_RELAXDOMAIN
|
static String |
HTMLB_SEC508
|
static String |
HTMLB_STYLEPATH
|
static String |
HTMLB_TRAYDESIGN
|
| Method Summary | |
void |
addPerfCounter(String line)
adds performance counters written a comments in the HTML source |
void |
cleanUp()
deletes temporary file of mime multipart postings. |
Document |
createDocument(String title)
create a new document. |
Form |
createForm()
create a new form and make it the current form. |
Form |
createFormDocument(String title)
create a new document and automatically create a form. |
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. |
Document |
getDocument()
gets the current document |
boolean |
getDomainRelaxation()
Get the flag for domain relaxation. |
IFileParam |
getFileParam(String name)
|
MobileWmlCard |
getHiddenCard()
|
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. |
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 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 |
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 traydesign the page is contained |
Writer |
getWriter()
get the java.io.Writer for output operations |
boolean |
isFileParam(String name)
|
boolean |
isHasContentPadding()
|
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 c)
temporary solution for mixed-mode, i.e. creation of component/container structures and raw output. |
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 |
setClassLoader(ClassLoader classLoader)
Set the class loader for this context. |
void |
setCurrentForm(Form form)
set the current form. |
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 hasContentPadding)
|
void |
setJavascriptPath(String javascriptPath)
set the URL path where the JavaScript libraries can be found |
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 |
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 trayType)
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 |
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)
|
| Field Detail |
public static final String HTMLB_JSPATH
public static final String HTMLB_MIMEPATH
public static final String HTMLB_SEC508
public static final String HTMLB_ACTIONURL
public static final String HTMLB_STYLEPATH
public static final String HTMLB_RELAXDOMAIN
public static final String HTMLB_TRAYDESIGN
public static final String HTMLB_LOCALE
public static final String HTMLB_HASCONTENTPADDING
| Method Detail |
public Event getCurrentEvent()
public Enumeration getParameterNames()
public String getParameter(String name)
You 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.
public String[] getParameterValues(String name)
name - a String containing the name of the
parameter whose value is requested
public boolean isSingleValueParameter(String name)
public boolean isFileParam(String name)
public IFileParam getFileParam(String name)
public String getActionUrl()
public void setActionUrl(String actionUrl)
actionUrl - the Url for tha actionpublic String getMimePath()
public void setStylePath(String stylePath)
public String getStylePath()
public void setMimePath(String mimePath)
mimePath - the path for the mimespublic String getJavascriptPath()
public void setJavascriptPath(String javascriptPath)
javascriptPath - URL pathpublic Object getRequest()
public void setRequest(Object request)
request - the request Objectpublic Object getResponse()
public void setResponse(Object response)
Implementations for this method should always test if the passed parameter is null since IPageContext may be instantiated without a response object.
response - the response Objectpublic BrowserType getBrowserId()
public Locale getLocale()
public Enumeration getLocales()
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.
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.
Locale
objects for the clientpublic Writer getWriter()
public void setWriter(Writer writer)
init method.
writer - the Writer used for outputpublic void write(String text)
text - a String to writepublic void writeHeadIncludes(String text)
public void writeHeadBegin(String text)
public void writeEncoded(String text)
text - a String to writepublic void write(int i)
i - a int whose value should be writtenpublic void render()
public void render(Component component)
component - the Component that should be rendered.
public void render(Component component,
int selector)
component - 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)
component - the Component that should be rendered.public String getJavascriptUrl()
public String getStylesheetUrl()
public boolean requiresSection508Rendering()
Section 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
public void setSection508Rendering(boolean requires508)
public Document createDocument(String title)
title - the title for the new documentpublic Form createFormDocument(String title)
title - the title for the new documentpublic Form createForm()
public void setFormDefaults(Form form)
form - the formpublic String getParamIdForComponent(Component c)
c - the component for which a unique ID is required
public String getParamIdForComponent(String componentId)
public void startDocument()
public void startDocumentHead(String title)
title - the Title for the pagepublic void writeHeadIncludes()
public void endDocumentHead()
public void startDocumentBody()
public void endDocumentBody()
public void endDocument()
public Document getDocument()
public String getCurrentFormId()
public Form getCurrentForm()
public Form getOldForm()
public Component getComponentForId(String elementId)
getDataForComponentId
elementId - the Id for the component
getDataForComponentId(String)
public Component getTableComponentForId(String tableId,
String elementId,
int row)
elementId - the name given to the component by the userrow - table row
public String getParameterForId(String elementId)
getDataForComponentId.
elementId - the Id for the component
getDataForComponentId(String)public String[] getParameterValuesForId(String elementId)
getDataForComponentId. As of release
1.0 the only component that can return values is
the ListBox.
elementId - the Id for the component
getDataForComponentId(String)public AbstractDataType getDataForComponentId(String elementId)
elementId - the Id for the component
public AbstractDataType getDataForComponentId(String tableId,
String elementId,
int row)
elementId - the Id for the componentpublic void setCurrentForm(Form form)
form - the current formpublic void push(Container c)
c - Container that should receive what's written.public void pop()
public void cleanUp()
public void setAttribute(String key,
Object value)
key - the keyvalue - the value associated with this keypublic Object getAttribute(String key)
key - the key
public ResourceBundle getResourceBundle(String baseName,
Locale locale)
baseName - the baseName for the bundlelocale - the locale for the bundle or null
if the default locale from the request should
be used.
ResourceBundlepublic String getComponentIdForLabel(String id)
public void setMessageBarAtBodyEnd(boolean messageBarAtBodyEnd)
public ClientInfo getClientInfo()
public MobileWmlCard getHiddenCard()
public void setClassLoader(ClassLoader classLoader)
public ClassLoader getClassLoader()
public void setDomainRelaxation(boolean relaxDomain)
public boolean getDomainRelaxation()
public HashMap getParamList()
public void setUsingSession(boolean useSession)
public boolean isUsingSession()
public void storeParametersInSession(String formId)
public Object getParent()
public void setParent(Object parent)
public void rebuildComponents()
public Component[] getComponents()
public TrayDesign getTrayDesign()
public void setTrayDesign(TrayDesign trayType)
trayType - TrayDesign the traydesignpublic void registerStylesheet(String key)
public HashSet getStylesheets()
public void flush()
public void setRTL(boolean rtl)
public com.sap.tc.logging.Location getLogLocation()
public void setAdvancedAlignment(boolean advancedAlignment)
advancedAlignment - public void addPerfCounter(String line)
public boolean isHasContentPadding()
public void setHasContentPadding(boolean hasContentPadding)
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||