Yeah, it is (well, we could use a mutable reference to an immutable Map too
-- that might be a cleaner way to manage the issue Diego and Antonio
pointed out).

The reason for the change is this:  Ajax request A submits the form to the
server.  While A is executing, Ajax request B is also submitted and queues
up behind A.  A completes its work, binds a few actions, and updates part
of the UI.  Now B runs, binds a few actions, and updates another part of
the UI.  Since the form is now using B's snapshot, actions created by A
can't be seen any more.


On Sun, Mar 3, 2013 at 11:59 PM, nafg <notifications@github.com> wrote:

> In web/webkit/src/main/scala/net/liftweb/http/CssBoundScreen.scala:
>
> > @@ -97,7 +99,7 @@ trait CssBoundScreen extends ScreenWizardRendered with Loggable {
> >
> >    protected def mapLocalAction[T](func: () => JsCmd)(f: String => T): T = {
> >      val name = randomString(20)
> > -    LocalActions.set(LocalActions.is + (name -> func))
> > +    LocalActions.get += (name -> func)
>
> Is it necessary to use a mutable Map?
> … <#13d327b11cd76c62_>
> On Sat, Mar 2, 2013 at 10:54 AM, Antonio Salazar Cardozo <
> notifications@github.com> wrote: In
> web/webkit/src/main/scala/net/liftweb/http/CssBoundScreen.scala: > @@ -97,7
> +99,7 @@ trait CssBoundScreen extends ScreenWizardRendered with Loggable {
> > > protected def mapLocalAction[T](func: () => JsCmd)(f: String => T): T =
> { > val name = randomString(20) > - LocalActions.set(LocalActions.is +
> (name -> func)) > + LocalActions.get += (name -> func) I will let you judge
> if this affects that, but keep in mind that a slow Ajax request will time
> out on the client, at which point the client is free to fire off another
> request. Exponential backoff means that request may not be a retry (a retry
> won't rerun the code anymore), so you can end up with two or more requests
> running from a given session at a given moment. — Reply to this email
> directly or view it on GitHub<
> https://github.com/lift/framework/pull/1415/files#r3215252> .
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/lift/framework/pull/1415/files#r3218846>
> .
>