Do you have a 2-step form? This poster is correct.
Save the conversion to RequestVar .
in the above example, the method you want to save displays, so the 1st memoize transform:
private def renderTest= SHtml.memoize { render }
Then you can save this memoized conversion to RequestVar (for 1 request) or, possibly, TransientRequestVar depending on your needs.
private object testTemplate extends RequestVar(renderTest)
If you want to play the conversion, from the ajax event is testTemplate.is.applyAgain.
Perhaps I misunderstood the original question, b / c, if you want to make a 2-step form, you really don't need memoize. Memoize - if something changes in your current form and you want to update it through the ajax event, that is, when you click or when changing, b / c, the form will usually not be updated if you did not ajax submit.
source share