LiftSession.processSnippet should handle StatefulSnippet instances returned via LiftRules.snippetDispatch
Given a StatefulSnippet class Foo, the following code returns a new instance every time because we don't properly locate current registered instances:
See http://groups.google.com/group/liftweb/browse_thread/thread/45feeef36b91ee9b for details
LiftRules.snippetDispatch.append {
case "TestHello" => new TestHello
}
See http://groups.google.com/group/liftweb/browse_thread/thread/45feeef36b91ee9b for details
Leave a comment
on 2010-08-19 19:49 *
By dchenbecker
Initial work checked in on dcb-issue-580. Asking DPP for review to make sure this looks OK.
(In revision:d7b1c1205bc255a4e1c83a8098c12b13cad5e169) Fixed snippetDispatch to work with StatefulSnippets
Closes #580
Reorganized the resolution of snippet instances to properly
handle the case where snippetDispatch is returning a new
StatefulSnippet instance.
Branch: master
Closes #580
Reorganized the resolution of snippet instances to properly
handle the case where snippetDispatch is returning a new
StatefulSnippet instance.
Branch: master