MappedAccess
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
Members list
Value members
Concrete methods
Download file from the client side by file handler
Download file from the client side by file handler
Attributes
Download the selected file list from input appropriate to given element id. Use this method carefully because all files are saving to RAM.
Download the selected file list from input appropriate to given element id. Use this method carefully because all files are saving to RAM.
Attributes
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).
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).
Attributes
Downloads form from the client. Useful when when you want to read big amount of fields. Do not use this method for downloading files, however it is possible.
Downloads form from the client. Useful when when you want to read big amount of fields. Do not use this method for downloading files, however it is possible.
event(submit) { access =>
access
.downloadFormData(myForm)
.flatMap { formData =>
val picture = data.file("picture") // Array[Byte]
val title = data.text("title") // String
access.transition {
// ... transtion
}
}
}
Attributes
- id
form elementId
Execute arbitrary JavaScript code on client and get stringified JSON back.
Execute arbitrary JavaScript code on client and get stringified JSON back.
for {
_ <- access.evalJs("new Date().getTimezoneOffset()").map(offset => ...)
_ <- access.evalJs(js"$myForm.submit()").map(offset => ...)
} yield ()
Attributes
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.
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.
Attributes
Get only file list for input
Get only file list for input
Attributes
Extracts property of element from client-side DOM.
Extracts property of element from client-side DOM.
Attributes
- See also:
- Since:
0.6.0
- Example:
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 () }
Publish message to environment.
Publish message to environment.
Attributes
Register callback that could be invoked from the client side.
Register callback that could be invoked from the client side.
// Scala
access.registerCallback("myCallback") { myArg =>
Future(println(myArg))
}
// JavaScript
Korolev.invokeCallback('myCallback', 'myArgValue');
Attributes
Purge inputs in given form.
Purge inputs in given form.
Attributes
- id
form element id binding
Gives current state.
Gives current state.
Attributes
Applies transition to current state.
Applies transition to current state.
Attributes
Applies asynchronous transition to current state. All transitions will wait until this transition will executed.
Applies asynchronous transition to current state. All transitions will wait until this transition will executed.
NOTE: Do not use this method id you work with effects which take lot of time for execution. It's may lead to hanging of your app.
Attributes
Applies transition to current state and awaits render.
Applies transition to current state and awaits render.
Attributes
Attributes
- See also:
Upload stream to the client side with selected name, size and mimeType
Upload stream to the client side with selected name, size and mimeType
Attributes
Inherited methods
Attributes
- Inherited from:
- BaseAccess
Attributes
- Inherited from:
- BaseAccess
Applies transition to current state.
Shortcut for property(id).get(propName)
.
Shortcut for property(id).get('value)
.
Deprecated and Inherited methods
Shortcut for property(id).get(propName)
.
Shortcut for property(id).get(propName)
.
Attributes
- Since:
0.6.0
- Deprecated
- true
- Inherited from:
- BaseAccess
Attributes
- Deprecated
[Since version 1.5.0]
- Inherited from:
- BaseAccess