Very interesting defect you found. There's a map of functions associated with the session. That map was not being updated for functions created during a partial update.
I've committed a fix and tested it with the enclosed code.
Thanks for finding the defect.
As a matter of style, I don't think it's the best thing for a CometActor to
update stuff outside it's screen real estate, but it should work. I would
opt to make the menus another comet actor and have them redraw based on
server state changing.
On Wed, Nov 12, 2008 at 10:33 AM, Ramzi BEN YAHIA
<[EMAIL PROTECTED]>wrote:
> Hi all,
> I've never managed to make something like this work, so I'm wondering if
> there's another way to do it.
> I render a component using a simple snippet, and I update its status using
> a comet (partialUpdate), I want to update also its own menu and the
> available actions depending on its status.
> I've implemented a method for this component that will return it's menu as
> a NodeSeq containing SHtml.a's, this method is called by the Comet(well,
> with 0.9 it throws a NullPointerException, but it seems that it's been fixed
> in 0.10). However the returned SHtml.a's when clicked are not apparently
> executed on the server.
> So if someone would explain what's happening or provide me with an
> alternative way for acheiving my requirement, I'll be very grateful.
>
> a simple code example :
> override def lowPriority = {
> case action : String => partialUpdate(
> AppendHtml(
> "container",
> SHtml.a(Text("click")){
> println("clicked")
> Noop
> }
> ))
> }
>
> Cheers,
> Ramzi
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---
funky.tgz
Description: GNU Zip compressed data
