[Lift] Communication between snippet and comet actor via RequestVar

2010-01-29 Thread ced
Hi all,

I've got the following scenario: A comet actor renders a link like
this:
SHtml.link(myURL, handleClick, Text(linkText), target -
new_window)

The handleClick function then stores some information in a RequestVar.
Embedded into the page referenced by myURL, is a snippet that accesses
the RequestVar.

My problem now is that the RequestVar, when accessed by the snippet is
always empty. What I know is that the handleClick really stores
something into the RequestVar.

What am I doing wrong? Any help is appreciated.

Thanks,
Chris

-- 
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.



Re: [Lift] Communication between snippet and comet actor via RequestVar

2010-01-29 Thread David Pollak
CometActors do not have a request context and thus do not support request
vars.  The function generated during the execution of a CometActor is run in
the context of the CometActor.

This is an interesting and novel use case... Let me think about it for a
little while.

On Fri, Jan 29, 2010 at 12:31 PM, ced docpom...@googlemail.com wrote:

 Hi all,

 I've got the following scenario: A comet actor renders a link like
 this:
 SHtml.link(myURL, handleClick, Text(linkText), target -
 new_window)

 The handleClick function then stores some information in a RequestVar.
 Embedded into the page referenced by myURL, is a snippet that accesses
 the RequestVar.

 My problem now is that the RequestVar, when accessed by the snippet is
 always empty. What I know is that the handleClick really stores
 something into the RequestVar.

 What am I doing wrong? Any help is appreciated.

 Thanks,
 Chris

 --
 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.comliftweb%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.