c

forms

FormController

case class FormController[T](nameBase: String) extends FormControllerBase with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FormController
  2. Serializable
  3. Product
  4. Equals
  5. FormControllerBase
  6. HasErrors
  7. HasTouches
  8. HasValues
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new FormController(nameBase: String)

Type Members

  1. type FormValidator = ((_values)#Value, Seq[String]) => Future[MapErrors.Errors]

    Validate values, only checking Seq[String] fields, or all fields (form level validation) if Nil.

    Validate values, only checking Seq[String] fields, or all fields (form level validation) if Nil. Return errors.

    Definition Classes
    FormControllerBase
  2. type ResetCallback = ((_values)#Value, FormActions) => Future[Unit]
    Definition Classes
    FormControllerBase
  3. type SubmitCallback = ((_values)#Value, FormActions) => Future[Unit]
    Definition Classes
    FormControllerBase
  4. type Validator = (Option[Any]) => Future[String]

    Validate a single value, return user message.

    Validate a single value, return user message. Used for field level validations.

    Definition Classes
    FormControllerBase
  5. type Validators = Dictionary[Validator]

    Validators indexed by attribute name.

    Validators indexed by attribute name.

    Definition Classes
    FormControllerBase
  6. sealed trait Action extends AnyRef

    Actions that are sent by child form elements.

    Actions that are sent by child form elements.

    Definition Classes
    FormControllerBase
  7. case class Context(props: FormProps, initialValue: Value, validate: UndefOr[FormValidator]) extends Product with Serializable

    The context is slightly duplicative in that initialValues and validate are already in FormProps.

    The context is slightly duplicative in that initialValues and validate are already in FormProps.

    Definition Classes
    FormControllerBase
  8. case class FieldErrors(errors: Errors, merge: Boolean) extends Action with Product with Serializable

    Set field errors.

    Set field errors. Either replacing all of the existing or merging this into the existing field errors.

    Definition Classes
    FormControllerBase
  9. case class FieldValue(field: String, value: Value, validate: Boolean) extends Action with Product with Serializable

    Send the attibute that changed and an updated Value object.

    Send the attibute that changed and an updated Value object.

    Definition Classes
    FormControllerBase
  10. case class FormActions(setFieldValue: (String, Value, Boolean) => Unit = (_, _, _) => (), setError: (String, String) => Unit = (_, _) => (), setErrors: (Errors, Boolean) => Unit = (_, _) => (), setTouched: (String, Boolean) => Unit = (_, _) => (), submit: () => Unit = () => (), reset: (Option[Value]) => Unit = _ => (), validateField: (String) => Future[Errors] = _ => Future.successful(EmptyErrors), validateForm: (Value) => Future[Errors] = _ => Future.successful(EmptyErrors)) extends Product with Serializable

    API to change this this component's state, church encoding of Actions.

    API to change this this component's state, church encoding of Actions. Most of these send state changing messages to the reducer. This API is should be easier to use then sending raw Action messages.

    Definition Classes
    FormControllerBase
  11. case class FormHandlers(handleChange: (String, Value) => Unit = (_, _) => (), handleBlur: (String) => Unit = _ => (), handleSubmit: react.vdom.FormEventHandler[Form] = _ => (), handleReset: react.vdom.FormEventHandler[Form] = _ => ()) extends Product with Serializable

    Handlers for controls.

    Handlers for controls. These are close to what's needed for most html controls.

    Definition Classes
    FormControllerBase
  12. case class FormProps(isValid: Boolean, dirty: Boolean, values: Value, errors: Errors, touched: Touches, isValidating: Boolean, isSubmitting: Boolean, submitCount: Int, didMount: Boolean, handlers: FormHandlers, actions: FormActions, initialValue: Value) extends Product with Serializable

    Props passed to the child component.

    Props passed to the child component.

    Definition Classes
    FormControllerBase
  13. trait Props extends Object with PropsBase
    Definition Classes
    FormControllerBase
    Annotations
    @JSType()
  14. trait PropsBase extends Object
    Definition Classes
    FormControllerBase
    Annotations
    @JSType()
  15. trait PropsInit extends Object with PropsBase
    Definition Classes
    FormControllerBase
    Annotations
    @JSType()
  16. case class Reset(values: Value) extends Action with Product with Serializable

    Reset using the values provided including initialValues.

    Reset using the values provided including initialValues.

    Definition Classes
    FormControllerBase
  17. case class State(value: Value, postAction: Option[Action] = None, submitting: Boolean = false, validating: Boolean = false, resetting: Boolean = false, errors: Errors = EmptyErrors, touched: Touches = EmptyTouches) extends Product with Serializable
    Definition Classes
    FormControllerBase
  18. case class Submitting(f: Boolean) extends Action with Product with Serializable

    Submit the form.

    Submit the form.

    f

    Whether submission should start or if it has ended.

    Definition Classes
    FormControllerBase
  19. case class Touched(field: String, validate: Boolean) extends Action with Product with Serializable

    Touch a field potentially forcing validation.

    Touch a field potentially forcing validation.

    Definition Classes
    FormControllerBase
  20. case class Validating(f: Boolean, errors: Option[Errors]) extends Action with Product with Serializable

    Indicate whether we are validating, performed asynchronously.

    Indicate whether we are validating, performed asynchronously. This action does not perform validation itself, it just provides the status or the result of validation if f = false.

    f

    validating status "is or is not validating"

    errors

    validation errors from the validation ffort, if any

    Definition Classes
    FormControllerBase

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val EmptyValidators: Dictionary[Validator]
    Definition Classes
    FormControllerBase
  5. val FormContext: ReactContext[Context]
    Definition Classes
    FormControllerBase
  6. val Name: String
    Definition Classes
    FormControllerFormControllerBase
  7. val _errors: MapErrors.type
    Definition Classes
    FormControllerHasErrors
  8. val _touches: MapTouches.type
    Definition Classes
    FormControllerHasTouches
  9. val _values: ScalaObjectValues[T]
    Definition Classes
    FormControllerHasValues
  10. def apply(props: PropsInit)(children: (FormProps) => ReactNode): ReactNode
    Definition Classes
    FormControllerBase
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def handleReset(currentValue: (_values)#Value, dispatch: Dispatch[Action], initialValue: MutableRef[(_values)#Value], factions: FormActions, reset: UndefOr[ResetCallback]): react.vdom.FormEventHandler[Form]
    Definition Classes
    FormControllerBase
  16. def handleSubmit(dispatch: Dispatch[Action]): react.vdom.FormEventHandler[Form]
    Definition Classes
    FormControllerBase
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def makeFormActions(currentValue: (_values)#Value, dispatch: Dispatch[Action], initialValue: MutableRef[(_values)#Value], validate: UndefOr[FormValidator]): FormActions
    Definition Classes
    FormControllerBase
  19. def makeFormHandlers(currentValue: (_values)#Value, dispatch: Dispatch[Action], initialValue: MutableRef[(_values)#Value], factions: FormActions, reset: UndefOr[ResetCallback]): FormHandlers
    Definition Classes
    FormControllerBase
  20. val nameBase: String
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def productElementNames: Iterator[String]
    Definition Classes
    Product
  25. val render: (Props) => ReactNode
    Definition Classes
    FormControllerBase
  26. def resetForm(dispatch: Dispatch[Action], initialValue: MutableRef[(_values)#Value], nextValues: Option[(_values)#Value]): Unit
    Definition Classes
    FormControllerBase
  27. def runFieldLevelValidations(validators: Dictionary[Validator], values: (_values)#Value): Future[MapErrors.Errors]

    Dummy for now.

    Dummy for now. Always return EmptyErrors.

    Definition Classes
    FormControllerBase
  28. def runValidations(values: (_values)#Value, fieldLevelValidators: Dictionary[Validator], handler: UndefOr[FormValidator]): Future[MapErrors.Errors]

    Run validation handlers.

    Run validation handlers. Merge resulting errors. Maybe the return value should be Future[Option[Errors]]. If the validators fail, return the exception in the Future's error channel.

    TODO: Keep all errors by using an applicative non-empty list.

    Definition Classes
    FormControllerBase
  29. def setError(dispatch: Dispatch[Action], field: String, message: String): Unit
    Definition Classes
    FormControllerBase
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from FormControllerBase

Inherited from HasErrors

Inherited from HasTouches

Inherited from HasValues

Inherited from AnyRef

Inherited from Any

Ungrouped