|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tacos.ajax.AjaxUtils
public class AjaxUtils
Utility class for ajax operation
Constructor Summary | |
---|---|
AjaxUtils()
|
Method Summary | |
---|---|
static String |
createOnclickHandler(AjaxInvocation invocation,
boolean globalScope)
Creates the onclick handler, to be used in links having ajax functionality. |
static String |
getLinkArguments(AjaxInvocation invocation,
boolean globalScope)
Generates a js structure, optionally making it globally safe to use. |
static String |
getLinkString(AjaxInvocation invocation,
boolean globalScope)
Generates a javascript function call, optionally making it globally safe to use. |
static boolean |
isAjaxCycle(org.apache.tapestry.IRequestCycle cycle)
Returns true if the request is Ajax. |
static boolean |
isAjaxRequest(AjaxDirectService service)
Indicate whether the current request is an ajax request. |
static void |
linkFieldObservers(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.services.ExpressionEvaluator eval,
AjaxWebRequest ajaxr,
org.apache.tapestry.IComponent comp,
org.apache.tapestry.PageRenderSupport prs,
String eventListener)
Connects a given IFormComponent to a client-side javascript
event that will cause whatever action has been specified on the field
via a DeferredScriptProducer component. |
static void |
linkFieldObservers(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.services.ExpressionEvaluator eval,
AjaxWebRequest ajaxr,
org.apache.tapestry.IComponent comp,
String uniqueId,
org.apache.tapestry.PageRenderSupport prs,
String eventListener)
Connects a given IFormComponent to a client-side javascript
event that will cause whatever action has been specified on the field
via a DeferredScriptProducer component. |
static void |
putAjaxParameter(AjaxInvocation ajaxInvocation,
Map parameters,
org.apache.tapestry.IRequestCycle cycle)
Put standard ajax parameters to an Map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxUtils()
Method Detail |
---|
public static final boolean isAjaxRequest(AjaxDirectService service)
service
-
public static boolean isAjaxCycle(org.apache.tapestry.IRequestCycle cycle)
cycle
- The Tapestry request cycle.
public static void putAjaxParameter(AjaxInvocation ajaxInvocation, Map parameters, org.apache.tapestry.IRequestCycle cycle)
ajaxInvocation
- parameters
- cycle
- public static void linkFieldObservers(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.services.ExpressionEvaluator eval, AjaxWebRequest ajaxr, org.apache.tapestry.IComponent comp, org.apache.tapestry.PageRenderSupport prs, String eventListener)
IFormComponent
to a client-side javascript
event that will cause whatever action has been specified on the field
via a DeferredScriptProducer
component.
Incoming string should look like "onchange=components.observer1,onblur=components.observer2"
cycle
- the current requesteval
- OGNL expression parserajaxr
- the ajax requestcomp
- component being referencedprs
- the script contribution engineeventListener
- command stringpublic static void linkFieldObservers(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.services.ExpressionEvaluator eval, AjaxWebRequest ajaxr, org.apache.tapestry.IComponent comp, String uniqueId, org.apache.tapestry.PageRenderSupport prs, String eventListener)
IFormComponent
to a client-side javascript
event that will cause whatever action has been specified on the field
via a DeferredScriptProducer
component.
Incoming string should look like "onchange=components.observer1,onblur=components.observer2".
cycle
- the current requesteval
- OGNL expression parserajaxr
- the ajax requestcomp
- component being referenceduniqueId
- overriden unique idprs
- the script contribution engineeventListener
- command stringpublic static String getLinkArguments(AjaxInvocation invocation, boolean globalScope)
invocation
- globalScope
- Should be true if the returned structure is to be used
in other components (or for anything not directly related to the given AjaxInvocation).
public static String getLinkString(AjaxInvocation invocation, boolean globalScope)
globalScope
- Should be true if the returned javascript is to be used
in other components (or for anything not related to the creation of this
link's markup).
public static String createOnclickHandler(AjaxInvocation invocation, boolean globalScope)
invocation
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |