|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.ajax.attributes.CallbackParameter
public class CallbackParameter
CallbackParameter
is a specification of a parameter that is used in an
AJAX callback
function. It specifies if and how the parameter is added to the function declaration, if and how
it is added to the AJAX callback and what code to use to generate the contents.
Method Summary | |
---|---|
static CallbackParameter |
context(String name)
Add a parameter to the function declaration. |
static CallbackParameter |
converted(String name,
String code)
Add a parameter to the function declaration that is also passed to the AJAX callback, but converted. |
static CallbackParameter |
explicit(String name)
Add a parameter to the function declaration that is also passed to the AJAX callback. |
String |
getAjaxParameterCode()
|
String |
getAjaxParameterName()
|
String |
getFunctionParameterName()
|
static CallbackParameter |
resolved(String name,
String code)
Add a parameter to the AJAX callback that is resolved inside the function, it will not be added as function parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CallbackParameter context(String name)
getCallbackFunction(context("event"), context("ui"));generates a function with two parameters, like
function(event, ui) {...}
.
name
-
public static CallbackParameter explicit(String name)
getCallbackFunction(explicit("param"));generates a function with one parameter, like
function(param) {...}
where
'param' is passed literally as extra parameter to the AJAX callback.
name
-
public static CallbackParameter resolved(String name, String code)
getCallbackFunction(resolved("param", "global.substring(0, 3)"));generates a function without parameters, like
function() {...}
where the first 3
characters of the global variable 'global' are passed as extra parameter to the AJAX callback
under the name 'param'.
name
- code
-
public static CallbackParameter converted(String name, String code)
getCallbackFunction(converted("param", "param.substring(0, 3)"));generates a function with one parameter, like
function(param) {...}
where the
first 3 characters of 'param' are passed as extra parameter to the AJAX callback.
name
- code
-
public String getFunctionParameterName()
public String getAjaxParameterName()
public String getAjaxParameterCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |