In this section , I will explain how to re-render HTML Template without loading the browser . You can refresh HTML template without loading browser via AJAX using Scala and Ltft .
Lift provides SHtml.memoize which memoize the NodeSeq used in apply() and then call applyAgain() in an Ajax call .
You can re render a particular template part of HTML page or complete page .
1)Define Template
2) Set template in RequestVar
3)Now add template into top- level snippet call (render)
First time , when you go to page , renderPageNotes will be loaded . When you make any changes and you want to
reflect these changes without reloading the browser , you can click on button which will re-render the page via AJAX .
MemoizedTransform will capture the most recently changes applied (for the Request scope) in your ajax call . Then “applyAgain()” will transform these changes into memoized view .