abstract class Access[F[_], S, M] extends BaseAccess[F, S, M] with EventAccess[F, S, M]
Provides access to make side effects
- Alphabetic
- By Inheritance
- Access
- EventAccess
- BaseAccess
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Access()(implicit arg0: Async[F])
Abstract Value Members
-
abstract
def
downloadFiles(id: ElementId[F, S, M]): F[List[File[Array[Byte]]]]
Download selected file list from input correspondent to given element id.
Download selected file list from input correspondent to given element id.
- Definition Classes
- BaseAccess
-
abstract
def
downloadFilesAsStream(id: ElementId[F, S, M]): F[List[File[LazyBytes[F]]]]
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).
- Definition Classes
- BaseAccess
-
abstract
def
downloadFormData(id: ElementId[F, S, M]): FormDataDownloader[F, S]
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
- Definition Classes
- BaseAccess
-
abstract
def
evalJs(code: String): F[String]
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 => ...)
- Definition Classes
- BaseAccess
-
abstract
def
eventData: F[String]
Gives json with string, number and boolean fields of object of the event happened in current render phase.
Gives json with string, number and boolean fields of object of the event happened in current render phase. Note that is expensive operation which requires network round trip.
- Definition Classes
- EventAccess
-
abstract
def
focus(id: ElementId[F, S, M]): F[Unit]
Makes focus on the element
Makes focus on the element
- Definition Classes
- BaseAccess
-
abstract
def
property(id: ElementId[F, S, M]): PropertyHandler[F]
Extracts property of element from client-side DOM.
Extracts property of element from client-side DOM.
- Definition Classes
- BaseAccess
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
Example: -
abstract
def
publish(message: M): F[Unit]
Publish message to environment.
Publish message to environment.
- Definition Classes
- BaseAccess
-
abstract
def
sessionId: F[QualifiedSessionId]
Gives current session id.
Gives current session id.
- Definition Classes
- BaseAccess
-
abstract
def
state: F[S]
Gives current state.
Gives current state.
- Definition Classes
- BaseAccess
-
abstract
def
transition(f: Transition[S]): F[Unit]
Applies transition to current state.
Applies transition to current state.
- Definition Classes
- BaseAccess
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
maybeTransition(f: PartialFunction[S, S]): F[Unit]
Applies transition to current state.
Applies transition to current state.
- Definition Classes
- BaseAccess
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
property(id: ElementId[F, S, M], propName: Symbol): F[String]
Shortcut for
property(id).get(proName)
.Shortcut for
property(id).get(proName)
.- Definition Classes
- BaseAccess
- Since
0.6.0
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
valueOf(id: ElementId[F, S, M]): F[String]
Shortcut for
property(id).get('value)
.Shortcut for
property(id).get('value)
.- Definition Classes
- BaseAccess
- Since
0.6.0
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )