On Sun, Apr 5, 2009 at 6:06 AM, Clemens Oertel <clemens.oer...@gmail.com>wrote:

> Thanks, David.
> Just for my understanding: Links generated by SHtml.link are valid
> throughout the entire session?
>

They are valid as long as they are being displayed on a page.  Lift has a
garbage collection mechanism and, by default, if something that is bound to
a function (e.g., a link like this), is not on an HTML page for 10 minutes,
it will be garbage collected.


>
> For a multi-page form, storing the referrer in the first step in a
> RequestVar would then also work, I take it.
>

A SessionVar, not a RequestVar.  RequestVars have the lifespan of a single
request... which is very short.

Thanks,

David


>
> Thank you,
> Clemens
>
> On 4-Apr-09, at 6:41 PM, David Pollak wrote:
>
> S.referer.map(from => SHtml.link("cancel", () => redirectTo(from))) openOr
> Text("")
>
> On Sat, Apr 4, 2009 at 3:20 PM, Clemens Oertel 
> <clemens.oer...@gmail.com>wrote:
>
>>
>> Hi,
>>
>> What's the best way to get generic "Cancel" links into forms, lift-
>> style? Assuming that a form can be called from different pages in the
>> application, and the cancel link should return to the originating page?
>> Would it work to have a RequestVar for the target of the cancel link,
>> and populate it using the linking page's URI:
>> SHtml.link(editUrl, () => {...; cancelLinkRV(S.request.uri)},
>> Text("Edit"))
>>
>> Is the URI really reusable like this?
>>
>> Or is there already some better way provided by lift?
>>
>> Thanks,
>> Clemens
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
>
>
>
> Clemens Oertel
> clem...@oertel.ca
>
>
>
>
>
> Clemens Oertel
> clem...@oertel.ca
>
>
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to