|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javawebparts.ajaxparts.taglib.AjaxUtils
This class contains utility functions used throughout the taglib.
Field Summary | |
private static org.apache.commons.logging.Log |
log
Log instance. |
Constructor Summary | |
private |
AjaxUtils()
This is a utility class, so we want a private noarg constructor so instances cannot be created. |
Method Summary | |
static java.lang.String |
elementRefFromAjaxRef(java.lang.String ajaxRef)
This method takes an ajaxRef (which is assumed to be in the correct format) and returns just the element's ajaxRef. |
static java.lang.String |
getResource(java.lang.String inResName)
This method returns a String from a resource loaded from the classpath, including within a JAR file. |
static java.lang.String |
getScopedAsync(AjaxGroup aGroup,
AjaxElement aElement,
AjaxEvent aEvent)
This method returns the async for a given event based on scope rules. |
static java.lang.String |
getScopedForm(AjaxGroup aGroup,
AjaxElement aElement,
AjaxEvent aEvent)
This method returns the form for a given event based on scope rules. |
static java.lang.String |
getScopedMethod(AjaxGroup aGroup,
AjaxElement aElement,
AjaxEvent aEvent)
This method returns the method for a given event based on scope rules. |
static java.lang.String |
getScopedPostProc(AjaxGroup aGroup,
AjaxElement aElement,
AjaxEvent aEvent)
This method returns the postPRoc for a given event based on scope rules. |
static java.lang.String |
getScopedPreProc(AjaxGroup aGroup,
AjaxElement aElement,
AjaxEvent aEvent)
This method returns the preProc for a given event based on scope rules. |
private static java.io.InputStream |
getStream(java.lang.String inResName)
This method returns an InputStream on a resource loaded from the classpath, including within a JAR file. |
static java.lang.String |
groupRefFromAjaxRef(java.lang.String ajaxRef)
This method takes an ajaxRef (which is assumed to be in the correct format) and returns just the group's ajaxRef. |
private static java.lang.String |
stringFromInputStream(java.io.InputStream inIS)
This method takes as input an InputStream and returns it as a String. |
static void |
updatePageScopeVars(java.lang.String ajaxRef,
javax.servlet.jsp.PageContext pageContext,
AjaxGroup aGroup,
AjaxElement aElement)
This method updates the two page-scope collections that is built up as event, manual and timer tags are encountered and which store all the ajaxREFs and handlers (request, response oe error) encountered on the JSP. |
static boolean |
validateAjaxRef(java.lang.String ajaxRef)
This method validates that a string purported to be an ajaxRef is in the form xxxx/yyyy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static org.apache.commons.logging.Log log
Constructor Detail |
private AjaxUtils()
Method Detail |
public static java.lang.String getResource(java.lang.String inResName)
inResName
- The name of the resource to load. This should be a path
specifier WITHOUT a leading slash.
private static java.io.InputStream getStream(java.lang.String inResName)
inResName
- The name of the resource to load. This should be a path
specifier WITHOUT a leading slash.
private static java.lang.String stringFromInputStream(java.io.InputStream inIS)
inIS
- The InputStream to "convert".
public static boolean validateAjaxRef(java.lang.String ajaxRef)
ajaxRef
- The purported ajaxRef to validate.
public static java.lang.String groupRefFromAjaxRef(java.lang.String ajaxRef)
ajaxRef
- The ajaxRef.
public static java.lang.String elementRefFromAjaxRef(java.lang.String ajaxRef)
ajaxRef
- The ajaxRef.
public static void updatePageScopeVars(java.lang.String ajaxRef, javax.servlet.jsp.PageContext pageContext, AjaxGroup aGroup, AjaxElement aElement)
ajaxRef
- The ajaxRef of the tag being handled.pageContext
- The PageContext of the JSP being rendered.aGroup
- The AjaxGroup instance that is the parent of the
element referenced by the tag that called this.aElement
- The AjaxElement instance that of the element referenced
by the tag that called this.public static java.lang.String getScopedForm(AjaxGroup aGroup, AjaxElement aElement, AjaxEvent aEvent)
aGroup
- The AjaxGroup that is parent to this event.aElement
- The AjaxElement that is parent to this event.aEvent
- The AjaxEvent that is parent to this event.
public static java.lang.String getScopedMethod(AjaxGroup aGroup, AjaxElement aElement, AjaxEvent aEvent)
aGroup
- The AjaxGroup that is parent to this event.aElement
- The AjaxElement that is parent to this event.aEvent
- The AjaxEvent that is parent to this event.
public static java.lang.String getScopedAsync(AjaxGroup aGroup, AjaxElement aElement, AjaxEvent aEvent)
aGroup
- The AjaxGroup that is parent to this event.aElement
- The AjaxElement that is parent to this event.aEvent
- The AjaxEvent that is parent to this event.
public static java.lang.String getScopedPreProc(AjaxGroup aGroup, AjaxElement aElement, AjaxEvent aEvent)
aGroup
- The AjaxGroup that is parent to this event.aElement
- The AjaxElement that is parent to this event.aEvent
- The AjaxEvent that is parent to this event.
public static java.lang.String getScopedPostProc(AjaxGroup aGroup, AjaxElement aElement, AjaxEvent aEvent)
aGroup
- The AjaxGroup that is parent to this event.aElement
- The AjaxElement that is parent to this event.aEvent
- The AjaxEvent that is parent to this event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |