er.ajax
Class AjaxOption
java.lang.Object
er.ajax.AjaxOption
- Direct Known Subclasses:
- AjaxConstantOption
public class AjaxOption
- extends Object
AjaxOption provides a bridge between a binding value in an AjaxComponent or AjaxDynamicElement and one JavaScript formatted
key-value pair in a dictionary. An AjaxOption consists of four values:
- Name: the key value in the dictionary
- Binding Name: the name of the binding in an AjaxComponent or AjaxDynamicElement to get the Java value from
- Default Value: optional default value if binding name evaluates to a null value
- Type: one of the AjaxOption.Type constants in AjaxOption
- See Also:
AjaxOptions,
AjaxValue
|
Nested Class Summary |
static class |
AjaxOption.Type
AjaxOption.Type is a simple enumeration of the types that AjaxValue can interpret. |
|
Method Summary |
protected void |
addToDictionary(WOComponent component,
NSDictionary<String,? extends WOAssociation> associations,
NSMutableDictionary<String,String> dictionary)
Evaluates this AjaxOption on a WODynamicElement and adds the name and JavaScript formatted value to dictionary. |
void |
addToDictionary(WOComponent component,
NSMutableDictionary<String,String> dictionary)
Evaluates this AjaxOption on a WOComponent and adds the name and JavaScript formatted value to dictionary. |
static NSMutableDictionary<String,String> |
createAjaxOptionsDictionary(NSArray<AjaxOption> ajaxOptions,
WOComponent component)
|
static NSMutableDictionary<String,String> |
createAjaxOptionsDictionary(NSArray<AjaxOption> ajaxOptions,
WOComponent component,
NSDictionary<String,? extends WOAssociation> associations)
|
Object |
defaultValue()
|
String |
name()
|
AjaxOption.Type |
type()
|
AjaxValue |
valueForObject(Object obj)
|
protected Object |
valueInComponent(WOComponent component)
|
protected Object |
valueInComponent(WOComponent component,
NSDictionary<String,? extends WOAssociation> associations)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT
public static final AjaxOption.Type DEFAULT
STRING
public static final AjaxOption.Type STRING
SCRIPT
public static final AjaxOption.Type SCRIPT
NUMBER
public static final AjaxOption.Type NUMBER
ARRAY
public static final AjaxOption.Type ARRAY
STRING_ARRAY
public static final AjaxOption.Type STRING_ARRAY
BOOLEAN
public static final AjaxOption.Type BOOLEAN
STRING_OR_ARRAY
public static final AjaxOption.Type STRING_OR_ARRAY
DICTIONARY
public static final AjaxOption.Type DICTIONARY
FUNCTION
public static final AjaxOption.Type FUNCTION
FUNCTION_1
public static final AjaxOption.Type FUNCTION_1
FUNCTION_2
public static final AjaxOption.Type FUNCTION_2
AjaxOption
public AjaxOption(String name)
AjaxOption
public AjaxOption(String name,
AjaxOption.Type type)
AjaxOption
public AjaxOption(String name,
Object defaultValue,
AjaxOption.Type type)
AjaxOption
public AjaxOption(String name,
String bindingName,
Object defaultValue,
AjaxOption.Type type)
name
public String name()
type
public AjaxOption.Type type()
valueForObject
public AjaxValue valueForObject(Object obj)
- Parameters:
obj - the Object to return an AjaxValue for
- Returns:
- an AjaxValue encapsulating obj with the same type as this AjaxOption
defaultValue
public Object defaultValue()
valueInComponent
protected Object valueInComponent(WOComponent component)
valueInComponent
protected Object valueInComponent(WOComponent component,
NSDictionary<String,? extends WOAssociation> associations)
addToDictionary
public void addToDictionary(WOComponent component,
NSMutableDictionary<String,String> dictionary)
- Evaluates this AjaxOption on a WOComponent and adds the name and JavaScript formatted value to dictionary.
- Parameters:
component - WOComponent to get binding value fromdictionary - mutable dictionary to add key-value pair to
addToDictionary
protected void addToDictionary(WOComponent component,
NSDictionary<String,? extends WOAssociation> associations,
NSMutableDictionary<String,String> dictionary)
- Evaluates this AjaxOption on a WODynamicElement and adds the name and JavaScript formatted value to dictionary.
- Parameters:
component - WOComponent to get binding value fromassociations - dictionary of associations to get WOAssocation providing value fromdictionary - mutable dictionary to add key-value pair to
createAjaxOptionsDictionary
public static NSMutableDictionary<String,String> createAjaxOptionsDictionary(NSArray<AjaxOption> ajaxOptions,
WOComponent component)
- Parameters:
ajaxOptions - list of AjaxOption to evaluate on componentcomponent - WOComponent to get binding value from
- Returns:
- dictionary produced by evaluating the array of AjaxOption on a WOComponent and adding the resulting name and JavaScript formatted values
createAjaxOptionsDictionary
public static NSMutableDictionary<String,String> createAjaxOptionsDictionary(NSArray<AjaxOption> ajaxOptions,
WOComponent component,
NSDictionary<String,? extends WOAssociation> associations)
- Parameters:
ajaxOptions - list of AjaxOption to evaluate on componentcomponent - WOComponent to get binding value fromassociations - dictionary of associations to get WOAssocation providing value from
- Returns:
- dictionary produced by evaluating the array of AjaxOption on a WOComponent and adding the resulting name and JavaScript formatted values
Copyright © 2002 – 2011 Project Wonder.