On Mon, Dec 28, 2009 at 11:26 AM, Naftoli Gugenheim <naftoli...@gmail.com>wrote:
> It could be changed, if it's thought worth it, once we are on 2.8. You need > a package level type alias (and def pointing to the factory). Change the > name to PageVar and add some deprecated aliases. > It's not a PageVar. The name will not change to PageVar. > But it would be silly. Someone needed a feature--accessing a RequestVar > from ajax. So now its semantics were changed to be a page var, while adding > an actual request var under the name TransientRequestVar, as internal API. > Now we'll rename RequestVar to PageVar? Musical chairs anyone? > What should really happen, or at least have happened, is that when someone > wanted the semantics of a page var in a RequestVar, instead of changing > RequestVar, a new class called PageVar should have been created. As they > say, hindsight is 20/20... > > > ------------------------------------- > Ross Mellgren<dri...@gmail.com> wrote: > > > On Dec 28, 2009, at 12:46 PM, Adam Warski wrote: > > > Hello, > > > >>> 1) Can I have in lift a "true" request variable/snippet, that is > >>> such which has a lifetime of one request (without any ajax > >>> callbacks)? I can't use TransientRequestVar because it's private. > >>> It would be useful to complete my ajax-form example (after an item > >>> is saved, a new one should be used; I guess I could just store the > >>> model instance in a RequestVar and set it to a new object after > >>> saving, but maybe there's a nicer way). > >> > >> TransientRequestVar could technically be made public but I don't see > >> compelling reasons to do that (yet). Do you need to do some logic > >> right before sending down the response? What is your use-case? > > Well for changing the tutorial form into an ajax form I guess the > > best solution is to store the model instance in a RequestVar and > > simply set it to a new instance after saving. So I don't have any > > immediate use-cases. > > > > But in other (Seam) projects I remember that I used the event scope > > (corresponding to TransientRequestVar) quite often, for example to > > have a single-request cache (things which may be invalidated even on > > the next ajax request). > > I've had this desire, though I ended up working around it. > > I think that RequestVar should really be PageVar, but unfortunately I > think RequestVar is fairly set in stone at this point. > > -Ross > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.