public class KendoDataSource extends com.googlecode.wicket.jquery.core.Options implements IKendoDataSource
| Modifier and Type | Class and Description |
|---|---|
static class |
KendoDataSource.HierarchicalDataSource
Provide the hierarchical data-source
|
| Modifier and Type | Field and Description |
|---|---|
protected com.googlecode.wicket.jquery.core.Options |
transport |
protected static String |
TYPE |
| Constructor and Description |
|---|
KendoDataSource(org.apache.wicket.Component component)
Constructor
|
KendoDataSource(org.apache.wicket.Component component,
String type)
Constructor
|
KendoDataSource(String name)
Constructor
|
KendoDataSource(String name,
String type)
Main Constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.googlecode.wicket.jquery.core.Options |
build()
Prepares the data-source to be rendered
|
String |
getName()
Gets the data-source's javacript variable name (global scoped)
|
static String |
getReadCallbackFunction(CharSequence url)
Gets the 'read' callback function from an url
|
static String |
getReadCallbackFunction(CharSequence url,
boolean useCache)
Gets the 'read' callback function from an url
|
String |
getToken()
Gets the unique token that acts as the script id.
|
static String |
nameOf(org.apache.wicket.Component component)
Gets the datasource name from the supplied
Component |
void |
setTransportCreate(String function)
Sets the 'transport.create' callback function
|
void |
setTransportDelete(String function)
Sets the 'transport.destroy' callback function
|
void |
setTransportRead(String function)
Sets the 'transport.read' callback function
|
void |
setTransportReadUrl(CharSequence url)
Sets the 'transport.read' callback url
|
void |
setTransportUpdate(String function)
Sets the 'transport.update' callback function
|
String |
toScript()
Gets the data-source jQuery statement.
|
protected static final String TYPE
protected final com.googlecode.wicket.jquery.core.Options transport
public KendoDataSource(String name)
name - the data-source name (caution: it should not contain invalid js-variable chars)public KendoDataSource(org.apache.wicket.Component component)
component - the hosting component (used to get the name)public KendoDataSource(String name, String type)
name - the data-source name (caution: it should not contain invalid js-variable chars)type - the response data type (json, xml)public KendoDataSource(org.apache.wicket.Component component,
String type)
component - the hosting component (used to get the name)type - the response data type (json, xml)public String getName()
public String getToken()
IKendoDataSourcegetToken in interface IKendoDataSourcepublic void setTransportRead(String function)
function - the javascript function.setTransportReadUrl(CharSequence)public void setTransportReadUrl(CharSequence url)
url - the callback urlpublic void setTransportCreate(String function)
function - the javascript functionpublic void setTransportUpdate(String function)
function - the javascript functionpublic void setTransportDelete(String function)
function - the javascript functionpublic com.googlecode.wicket.jquery.core.Options build()
public String toScript()
IKendoDataSourcetoScript in interface IKendoDataSourcepublic static String nameOf(org.apache.wicket.Component component)
Componentcomponent - the Componentpublic static String getReadCallbackFunction(CharSequence url)
url - the callback urlpublic static String getReadCallbackFunction(CharSequence url, boolean useCache)
url - the callback urluseCache - whether the function should use cacheCopyright © 2021 7thWeb. All rights reserved.