[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread Naftoli Gugenheim
Okay, that makes sense! I guess it's generated during the xml processing stage? - David Pollak wrote: On Wed, Aug 5, 2009 at 1:25 PM, Naftoli Gugenheim wrote: > > I have working now by instantiating a client snippet class and calling > S.mapSnippet with the s

[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread David Pollak
On Wed, Aug 5, 2009 at 1:25 PM, Naftoli Gugenheim wrote: > > I have working now by instantiating a client snippet class and calling > S.mapSnippet with the snippet's edit method. But why didn't it work by > calling its registerThisSnippet method? because the snippet didn't know its name. > > >

[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread Naftoli Gugenheim
I have working now by instantiating a client snippet class and calling S.mapSnippet with the snippet's edit method. But why didn't it work by calling its registerThisSnippet method? - David Pollak wrote: Create a top-level RequestVar: object TheClient exten

[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread David Pollak
Create a top-level RequestVar: object TheClient extends RequestVar[Box[Client]](Empty) object ReturnToMe extends RequestVar[Box[() => Unit]](Empty) class ClientEditor extends StatefulSnippet { val referer = S.referer openOr "/" val client = TheClient.is openOr {S.error("client not provided");

[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread Naftoli Gugenheim
I don't have code available to post right now, but let me try to explain better. Basically you're editing a request, which is associated with a client. Now when your entering the request you may notice that the client's info is wrong. So I need a link to the client editing page, which is Statefu

[Lift] Re: Prepare StatefulSnippet in advance

2009-08-05 Thread David Pollak
Please provide a complete (executable) code sample so I can understand the flow. On Wed, Aug 5, 2009 at 9:40 AM, Naftoli Gugenheim wrote: > > Hi. I have one screen, /requests/edit, that links to /clients/edit, in > order to edit a specific client. Both use StatefulSnippet. In the link I > specify