Support for callOnce
Updated 1 year, 10 months ago
| Marius Danciu | Reviewers | ||
| 435 | dpp, marius, charles, joni, atsuhiko, jorge, naftoli, kris, indrajit, alexb, dlouwers, mstarzyk, rmellgren, jhoffman, probinett, jmadsen, mhartmann, jstrachan, jgoday | ||
| None | LiftWeb-archive | ||
Add a mechanism for user functions to be called only once, and after that to clean it up. In order to not affect current API's the approach is:
S.callOnce {
SHtml.ajaxButton(Text("Call once"), () => { println("pressed"); Noop; } )
}
if you bind functions inside callOnce block after the function is invoked it is removed from LiftSession
yes
