public class PageContext extends Object implements ContextMap
| Modifier and Type | Field and Description |
|---|---|
StackedMap |
attributes
Storage of the values for each component nesting level
|
static String |
REQUEST_COOKIES |
static String |
REQUEST_HEADERS |
static String |
REQUEST_PARAMETERS |
static String |
REQUEST_PATH
Reserved keys for accessing data provided by the HttpRequest.
|
static String |
REQUEST_URIQ |
static String |
SESSION |
| Constructor and Description |
|---|
PageContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginRender()
The HtmlCanvas is about to render a new component.
|
Object |
clear(String key)
Remove all entries from the Map.
|
protected void |
endRender()
The HtmlCanvas is finished rendering a component.
|
Boolean |
getBoolean(String key,
Boolean... optional)
Return the Boolean value stored a the key, or the value of optional if
absent.
|
ContextMap |
getContextMap(String key)
Answer a ContextAttributesAccess by a key
|
Float |
getFloat(String key,
Float... optional)
Return the Float value stored a the key, or the value of optional if
absent.
|
Integer |
getInteger(String key,
Integer... optional)
Return the Integer value stored a the key, or the value of optional if
absent.
|
Long |
getLong(String key,
Long... optional)
Return the Float value stored a the key, or the value of optional if
absent.
|
Object |
getObject(String key,
Object... optional)
Answer the value stored by a key
|
String |
getString(String key,
String... optional)
Answer the String value stored by a key
|
void |
renderForErrorOn(HtmlCanvas html)
Render error reporting information using the (debug) html
|
void |
renderForInpectorOn(Inspector inspector,
HtmlCanvas html)
Render inspection information using the (debug) html
|
Map<Object,Object> |
toMap()
Return a new Map containing all the context key,value pairs.
|
String |
toString() |
PageContext |
withBoolean(String key,
Boolean trueOrFalse)
Add (or overwrite) a key,Boolean pair to the Map.
|
PageContext |
withFloat(String key,
Float aFloat)
Add (or overwrite) a key,Float pair to the Map.
|
PageContext |
withInteger(String key,
Integer number)
Add (or overwrite) a key,Integer pair to the Map.
|
PageContext |
withLong(String key,
Long aLong)
Add (or overwrite) a key,Long pair to the Map.
|
PageContext |
withObject(String key,
Object value)
Store a value accessed by a key
|
PageContext |
withString(String key,
String value)
Store a value accessed by a key
|
public static final String REQUEST_PATH
public static final String REQUEST_URIQ
public static final String REQUEST_PARAMETERS
public static final String SESSION
public static final String REQUEST_HEADERS
public static final String REQUEST_COOKIES
public StackedMap attributes
public ContextMap getContextMap(String key)
public PageContext withObject(String key, Object value)
withObject in interface ContextMapkey - , not nullvalue, - any objectpublic Object getObject(String key, Object... optional)
getObject in interface ContextMapkey - , not nullpublic PageContext withString(String key, String value)
withString in interface ContextMapkey - , not nullvalue - , any Stringpublic String getString(String key, String... optional)
getString in interface ContextMapkey - , not nullpublic PageContext withInteger(String key, Integer number)
ContextMapwithInteger in interface ContextMapkey - number - public Integer getInteger(String key, Integer... optional)
ContextMapgetInteger in interface ContextMappublic PageContext withBoolean(String key, Boolean trueOrFalse)
ContextMapwithBoolean in interface ContextMapkey - trueOrFalse - public Boolean getBoolean(String key, Boolean... optional)
ContextMapgetBoolean in interface ContextMappublic PageContext withFloat(String key, Float aFloat)
ContextMapwithFloat in interface ContextMapkey - aFloat - public Float getFloat(String key, Float... optional)
ContextMapgetFloat in interface ContextMappublic PageContext withLong(String key, Long aLong)
ContextMapwithLong in interface ContextMapkey - aLong - public Long getLong(String key, Long... optional)
ContextMapgetLong in interface ContextMapprotected void beginRender()
protected void endRender()
public void renderForInpectorOn(Inspector inspector, HtmlCanvas html) throws IOException
html - IOExceptionpublic void renderForErrorOn(HtmlCanvas html) throws IOException
html - IOExceptionpublic Object clear(String key)
ContextMapclear in interface ContextMappublic Map<Object,Object> toMap()
ContextMaptoMap in interface ContextMapCopyright © 2010–2018. All rights reserved.