Hi all,

I have a question about whether it's possible to access RequestVars in
CometActors (specifically, to access them in localSetup). I believe it
is, based upon a recent thread about sharing them among snippets[1]
and an older thread about Actors accessing S[2]. But first, some
background, as I may be going around this in totally the wrong way and
would appreciate your thoughts.

I am making a dashboard to display a bunch of data that will be coming
in (near) real-time and I want to use Comet to make sure the user
always sees the most update-to-date information in their dashboard. I
have a variety of different aggregate values to display that fall into
several categories together, so I can group the calculations together.
I think this sectioning will prove useful in the future, as I can
imagine wanting to display some but not all of these sections on
another page.

Because the CometActors all will need to know the dashboard to which
they belong, my thought was to share this Mapper instance via a
RequestVar.

I call my snippet like so:
<lift:Dashboard.display>
</lift:Dashboard.display>

The snippet defines a RequestVar called myDashboard and then returns a
NodeSeq:
<div>
  <lift:comet type="DashboardHelper1">
  </lift:comet>
// ....
  <lift:comet type="DashboardHelperN">
  </lift:comet>
</div>

While I can get this all to compile, myDashboard is empty in the
CometActors. I understand that CometActors basically exist outside of
the normal request cycle, so would this be the reason why my
RequestVar is always empty? I was hoping that it would still be in the
request cycle when localSetup is called, but I can see why that would
be unrealistic.

I just tried using SessionVar instead of a RequestVar and this works.
However, I'm worried about having to be more careful about emptying
the SessionVar if requesting a different dashboard than if I would if
I were using a RequestVar. Is this an unrealistic fear?

What do you think is the best way to proceed?

Thanks for your help,
Peter Robinett

[1]: 
http://groups.google.com/group/liftweb/browse_thread/thread/5cf4ae2ecd0d56b5
[2]: 
http://groups.google.com/group/liftweb/browse_thread/thread/274cfc9d25a1ab0b
--~--~---------~--~----~------------~-------~--~----~
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