|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.TapestryUtils
Constants and static methods.
Field Summary | |
static java.lang.String |
FORM_ATTRIBUTE
|
static java.lang.String |
PAGE_RENDER_SUPPORT_ATTRIBUTE
|
Constructor Summary | |
TapestryUtils()
|
Method Summary | |
static java.lang.String |
buildClientElementReference(java.lang.String clientId)
Converts a clientId into a client-side DOM reference; i.e. |
static java.lang.String |
convertTapestryIdToNMToken(java.lang.String baseId)
A Tapestry component id is a little more liberal than an XML NMTOKEN. |
static java.lang.String |
enquote(java.lang.String input)
Enquotes a string within single quotes, ready for insertion as part of a block of JavaScript. |
static IComponent |
getComponent(IComponent container,
java.lang.String componentId,
java.lang.Class expectedType,
org.apache.hivemind.Location location)
Used by some generated code; obtains a component and ensures it is of the correct type. |
static IForm |
getForm(IRequestCycle cycle,
IComponent component)
Gets the previously stored IForm object. |
static PageRenderSupport |
getOptionalPageRenderSupport(IRequestCycle cycle)
Returns the PageRenderSupport object if previously stored, or null otherwise. |
static PageRenderSupport |
getPageRenderSupport(IRequestCycle cycle,
IComponent component)
Gets the previously stored PageRenderSupport object. |
static void |
removeForm(IRequestCycle cycle)
|
static void |
removePageRenderSupport(IRequestCycle cycle)
|
static java.lang.String[] |
split(java.lang.String input)
Splits a string using the default delimiter of ','. |
static java.lang.String[] |
split(java.lang.String input,
char delimiter)
Splits a single string into an array of strings, using a specific delimiter character. |
static void |
storeForm(IRequestCycle cycle,
IForm form)
Store the IForm instance using storeUniqueAttribute(IRequestCycle, String, Object) . |
static void |
storePageRenderSupport(IRequestCycle cycle,
PageRenderSupport support)
Stores the support object using storeUniqueAttribute(IRequestCycle, String, Object) . |
static void |
storeUniqueAttribute(IRequestCycle cycle,
java.lang.String key,
java.lang.Object object)
Stores an attribute into the request cycle, verifying that no object with that key is already present. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PAGE_RENDER_SUPPORT_ATTRIBUTE
public static final java.lang.String FORM_ATTRIBUTE
Constructor Detail |
public TapestryUtils()
Method Detail |
public static void storeUniqueAttribute(IRequestCycle cycle, java.lang.String key, java.lang.Object object)
cycle
- the cycle to store the attribute intokey
- the key to store the attribute asobject
- the attribute value to store
java.lang.IllegalStateException
- if a non-null value has been stored into the cycle with the provided key.public static void storePageRenderSupport(IRequestCycle cycle, PageRenderSupport support)
storeUniqueAttribute(IRequestCycle, String, Object)
.
public static void storeForm(IRequestCycle cycle, IForm form)
storeUniqueAttribute(IRequestCycle, String, Object)
.
public static PageRenderSupport getPageRenderSupport(IRequestCycle cycle, IComponent component)
PageRenderSupport
object.
cycle
- the request cycle storing the support objectcomponent
- the component which requires the support (used to report exceptions)
org.apache.hivemind.ApplicationRuntimeException
- if no support object has been storedpublic static IForm getForm(IRequestCycle cycle, IComponent component)
IForm
object.
cycle
- the request cycle storing the support objectcomponent
- the component which requires the form (used to report exceptions)
org.apache.hivemind.ApplicationRuntimeException
- if no form object has been storedpublic static void removePageRenderSupport(IRequestCycle cycle)
public static void removeForm(IRequestCycle cycle)
public static PageRenderSupport getOptionalPageRenderSupport(IRequestCycle cycle)
PageRenderSupport
object if previously stored, or null otherwise.
This is used in the rare case that a component wishes to adjust its behavior based on whether
the page render support services are avaiable (typically, adjust for whether enclosed by a
Body component, or not).
public static java.lang.String[] split(java.lang.String input)
public static java.lang.String[] split(java.lang.String input, char delimiter)
public static java.lang.String enquote(java.lang.String input)
public static java.lang.String convertTapestryIdToNMToken(java.lang.String baseId)
public static java.lang.String buildClientElementReference(java.lang.String clientId)
document.getElementById('id')
.
public static IComponent getComponent(IComponent container, java.lang.String componentId, java.lang.Class expectedType, org.apache.hivemind.Location location)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |