|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.TapestryUtils
public final class TapestryUtils
Constants and static methods.
Field Summary | |
---|---|
static String |
FIELD_PRERENDER
|
static String |
FORM_ATTRIBUTE
|
static String |
PAGE_RENDER_SUPPORT_ATTRIBUTE
|
Method Summary | |
---|---|
static String |
buildClientElementReference(String clientId)
Converts a clientId into a client-side DOM reference; i.e. |
static String |
capitalize(String input)
Capitalize the first letter of the input if at least 1 character. |
static String |
convertTapestryIdToNMToken(String baseId)
A Tapestry component id is a little more liberal than an XML NMTOKEN. |
static String |
enquote(String input)
Enquotes a string within single quotes, ready for insertion as part of a block of JavaScript. |
static IComponent |
getComponent(IComponent container,
String componentId,
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 void |
removePrerender(IRequestCycle cycle)
|
static String[] |
split(String input)
Splits a string using the default delimiter of ','. |
static String[] |
split(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 |
storePrerender(IRequestCycle cycle,
IComponent component)
Stores the IComponent into the cycle by FormSupport before doing a field
prerender. |
static void |
storeUniqueAttribute(IRequestCycle cycle,
String key,
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 String PAGE_RENDER_SUPPORT_ATTRIBUTE
public static final String FORM_ATTRIBUTE
public static final String FIELD_PRERENDER
Method Detail |
---|
public static void storeUniqueAttribute(IRequestCycle cycle, String key, Object object)
cycle
- the cycle to store the attribute intokey
- the key to store the attribute asobject
- the attribute value to store
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 void storePrerender(IRequestCycle cycle, IComponent component)
IComponent
into the cycle by FormSupport before doing a field
prerender.
cycle
- component
- 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 void removePrerender(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 available (typically, adjust for whether enclosed by a
Body component, or not).
public static String[] split(String input)
public static String[] split(String input, char delimiter)
public static String capitalize(String input)
public static String enquote(String input)
public static String convertTapestryIdToNMToken(String baseId)
public static String buildClientElementReference(String clientId)
document.getElementById('id')
.
public static IComponent getComponent(IComponent container, String componentId, Class expectedType, org.apache.hivemind.Location location)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |