use of com.axellience.vuegwt.core.client.component.options.props.PropOptions in project vue-gwt by Axellience.
the class VueComponentOptions method addJavaPropValidator.
/**
* Add a custom prop validator to validate a property
* @param javaMethodName Name of the method in the {@link VueComponent}
* @param propertyName The name of the property to validate
*/
@JsOverlay
public final void addJavaPropValidator(String javaMethodName, String propertyName) {
PropOptions propDefinition = (PropOptions) props.get(propertyName);
propDefinition.validator = getJavaComponentMethod(javaMethodName);
}
use of com.axellience.vuegwt.core.client.component.options.props.PropOptions in project vue-gwt by Axellience.
the class VueComponentOptions method addJavaPropDefaultValue.
/**
* Add a custom prop validator to validate a property
* @param javaMethodName Name of the method in the {@link VueComponent}
* @param propertyName The name of the property to validate
*/
@JsOverlay
public final void addJavaPropDefaultValue(String javaMethodName, String propertyName) {
PropOptions propDefinition = (PropOptions) props.get(propertyName);
propDefinition.defaultValue = getJavaComponentMethod(javaMethodName);
}
use of com.axellience.vuegwt.core.client.component.options.props.PropOptions in project vue-gwt by Axellience.
the class VueComponentOptions method addJavaProp.
/**
* Add a prop to our ComponentOptions.
* This will allow to receive data from the outside of our Component.
* @param propName The name of the property
* @param required Is the property required (mandatory)
* @param jsTypeName JS name of the type of this property, if not null we will ask Vue to type
* check based on it
*/
@JsOverlay
public final void addJavaProp(String propName, boolean required, String jsTypeName) {
PropOptions propDefinition = new PropOptions();
propDefinition.required = required;
if (jsTypeName != null)
propDefinition.type = ((JsPropertyMap<Object>) DomGlobal.window).get(jsTypeName);
addProp(propName, propDefinition);
}
Aggregations