Trait

korolev.Context

BaseAccess

Related Doc: package Context

Permalink

trait BaseAccess[F[_], S, M] extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseAccess
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def downloadFiles(id: ElementId[F, S, M]): F[List[File[Array[Byte]]]]

    Permalink

    Download selected file list from input correspondent to given element id.

  2. abstract def downloadFilesAsStream(id: ElementId[F, S, M]): F[List[File[LazyBytes[F]]]]

    Permalink

    Same as downloadFiles but for stream mode.

    Same as downloadFiles but for stream mode. The method is useful when user want to upload very large files list which is problematic to keep in memory (especially when count of users is more than one).

  3. abstract def downloadFormData(id: ElementId[F, S, M]): FormDataDownloader[F, S]

    Permalink

    Downloads form from client

    Downloads form from client

    event('submit) { access =>
      access
        .downloadFormData(myForm)
        .onProgress { (loaded, total) =>
          // transition …
        }
        .start
        .flatMap { formData =>
          val picture = data.file("picture") // Array[Byte]
          val title = data.text("title") // String
          access.transition {
            // ... transtion
          }
        }
    }
    id

    form elementId

  4. abstract def evalJs(code: String): F[String]

    Permalink

    Execute arbitrary JavaScript code on client and get stringified JSON back.

    Execute arbitrary JavaScript code on client and get stringified JSON back.

    access.evalJs("new Date().getTimezoneOffset()").map(offset => ...)
  5. abstract def focus(id: ElementId[F, S, M]): F[Unit]

    Permalink

    Makes focus on the element

  6. abstract def property(id: ElementId[F, S, M]): PropertyHandler[F]

    Permalink

    Extracts property of element from client-side DOM.

    Extracts property of element from client-side DOM.

    Example:
    1. event('click) { access =>
        for {
          request <- access.property(searchField).get('value)
          result  <- searchModel.search(request)
          _       <- access.transition {
            case state: State.Awesome =>
              state.copy(list = searchResult)
          }
        } yield ()
      }
    Since

    0.6.0

    See also

    Context.elementId

  7. abstract def publish(message: M): F[Unit]

    Permalink

    Publish message to environment.

  8. abstract def sessionId: F[QualifiedSessionId]

    Permalink

    Gives current session id.

  9. abstract def state: F[S]

    Permalink

    Gives current state.

  10. abstract def transition(f: Transition[S]): F[Unit]

    Permalink

    Applies transition to current state.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def maybeTransition(f: PartialFunction[S, S]): F[Unit]

    Permalink

    Applies transition to current state.

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def property(id: ElementId[F, S, M], propName: Symbol): F[String]

    Permalink

    Shortcut for property(id).get(proName).

    Shortcut for property(id).get(proName).

    Since

    0.6.0

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def valueOf(id: ElementId[F, S, M]): F[String]

    Permalink

    Shortcut for property(id).get('value).

    Shortcut for property(id).get('value).

    Since

    0.6.0

  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped