Re Render HTML Template using Scala and Lift

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 .

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!