public class KnockoutUtils extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier and Type | Field and Description |
---|---|
Objs.Property<Objs> |
domData |
Objs.Property<Objs> |
domNodeDisposal |
Objs.Property<Object[]> |
fieldsIncludedWithJsonPost |
Modifier | Constructor and Description |
---|---|
protected |
KnockoutUtils(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static KnockoutUtils |
$as(Object obj) |
<T> void |
addOrRemoveItem(KnockoutObservable<T> array,
T value,
T included) |
<T> void |
addOrRemoveItem(T[] array,
T value,
T included) |
<T> Array<T> |
arrayFilter(T[] array,
Function.A1<? super T,? extends Boolean> predicate) |
<T> T |
arrayFirst(T[] array,
Function.A1<? super T,? extends Boolean> predicate) |
<T> T |
arrayFirst(T[] array,
Function.A1<? super T,? extends Boolean> predicate,
Object predicateOwner) |
<T> void |
arrayForEach(T[] array,
Function.A2<? super T,? super Number,? extends Void> action) |
<T> Array<T> |
arrayGetDistinctValues(T[] array) |
<T> double |
arrayIndexOf(T[] array,
T item) |
<T,U> Array<U> |
arrayMap(T[] array,
Function.A1<? super T,? extends U> mapping) |
<T> Array<T> |
arrayPushAll(KnockoutObservableArray<T> array,
T[] valuesToPush) |
<T> Array<T> |
arrayPushAll(T[] array,
T[] valuesToPush) |
void |
arrayRemoveItem(Object[] array,
Object itemToRemove) |
<T> Array<KnockoutArrayChange<T>> |
compareArrays(T[] a,
T[] b) |
Objs |
extend(Objs target,
Objs source) |
Array<Object> |
getFormFields(Object form,
String fieldName) |
void |
objectForEach(Object obj,
Function.A2<? super Object,? super Object,? extends Void> action) |
Array<Object> |
parseHtmlFragment(String html) |
Object |
parseJson(String jsonString) |
<T> T |
peekObservable(KnockoutObservable<T> value) |
void |
postJson(Object urlOrForm,
Object data,
Object options) |
Object |
range(Object min,
Object max) |
void |
registerEventHandler(Object element,
Object eventType,
Function handler) |
void |
setHtml(Element node,
Function.A0<? extends String> html) |
void |
setHtml(Element node,
String html) |
void |
setTextContent(Object element,
KnockoutObservable<String> textContent) |
void |
setTextContent(Object element,
String textContent) |
String |
stringifyJson(Object data) |
String |
stringifyJson(Object data,
Function replacer) |
String |
stringifyJson(Object data,
Function replacer,
String space) |
void |
toggleDomNodeCssClass(Object node,
String className,
Boolean shouldHaveClass) |
void |
triggerEvent(Object element,
Object eventType) |
<T> T |
unwrapObservable(KnockoutObservable<T> value) |
<T> T |
unwrapObservable(T value) |
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
public Objs.Property<Objs> domData
public Objs.Property<Objs> domNodeDisposal
public Objs.Property<Object[]> fieldsIncludedWithJsonPost
protected KnockoutUtils(Objs.Constructor<?> c, Object js)
public static KnockoutUtils $as(Object obj)
public <T> void addOrRemoveItem(T[] array, T value, T included)
public <T> void addOrRemoveItem(KnockoutObservable<T> array, T value, T included)
public <T> Array<T> arrayFilter(T[] array, Function.A1<? super T,? extends Boolean> predicate)
public <T> T arrayFirst(T[] array, Function.A1<? super T,? extends Boolean> predicate, Object predicateOwner)
public <T> T arrayFirst(T[] array, Function.A1<? super T,? extends Boolean> predicate)
public <T> void arrayForEach(T[] array, Function.A2<? super T,? super Number,? extends Void> action)
public <T> Array<T> arrayGetDistinctValues(T[] array)
public <T> double arrayIndexOf(T[] array, T item)
public <T,U> Array<U> arrayMap(T[] array, Function.A1<? super T,? extends U> mapping)
public <T> Array<T> arrayPushAll(T[] array, T[] valuesToPush)
public <T> Array<T> arrayPushAll(KnockoutObservableArray<T> array, T[] valuesToPush)
public <T> Array<KnockoutArrayChange<T>> compareArrays(T[] a, T[] b)
public void objectForEach(Object obj, Function.A2<? super Object,? super Object,? extends Void> action)
public <T> T peekObservable(KnockoutObservable<T> value)
public void registerEventHandler(Object element, Object eventType, Function handler)
public void setHtml(Element node, Function.A0<? extends String> html)
public void setTextContent(Object element, KnockoutObservable<String> textContent)
public void toggleDomNodeCssClass(Object node, String className, Boolean shouldHaveClass)
public <T> T unwrapObservable(KnockoutObservable<T> value)
public <T> T unwrapObservable(T value)
Copyright © 2018. All rights reserved.