Ticket #364 (closed defect: fixed)

Opened 16 years ago

Last modified 16 years ago

no return value 'event' present in RemotingService.cfc->executeEvent()

Reported by: Chuck Savage <chuck@…> Owned by: cfgrok
Priority: normal Milestone: 3.1 Maintenance Beta
Version: 3.0.178 Severity: normal
Keywords: Cc:

Description

Have to manually inject the event value on call, to be able to get it as a value on return. Since remoting callback handlers don't necessarily know what event they are receiving a call back from.

Change History

Changed 16 years ago by cfgrok

If I am interpreting this ticket correctly, then it sounds like the remoting call is supplying a returnValues parameter that includes "event" as one of the desired values -- is that correct?

If so, and you wish to return the name of the called event, for an Ajax call you can use "eventName" (instead of "event") and this will return the name of the executed event-handler. For Flex/Flash remoting, the event name would need to be specifically added to the values object (which I believe is what is meant by "manually inject the event value on call" in the original post).

Changed 16 years ago by Chuck Savage <chuck@…>

Hmm, let me explain it a bit more verbose then.

In a normal view, you get injected into the event.GetValue?() series of values one called 'event'. I shouldn't need to say what it contains, I'm sure you know. Unmodified, it contains the called event, aka user.login, or products.lightsaber, etc.

Called remotely, there is no 'event' value. Even though you need an event in your remote procedure call for MG to use.

Since sometimes the remote procedure response handler needs to process returns from multiple event calls, it needs some way to know what event the data its handling was requested.

So, that is why I say that the event needs to be injected manually into the request feed, so that on return, the response handler knows what event was requested, and thereby know how to handle the data returned.

So you can use "eventName" instead of "event", I get that now. But why the difference between normal calls and remote calls for "event."? I suppose it just is. I've learned to work around this 'feature' and however you judge this as good enough with "eventName" instead of or in addition to "event" is fine with me.

Changed 16 years ago by DanWilson

  • milestone set to 3.1.x-next-patch

Changed 16 years ago by Chuck Savage <chuck@…>

So what's the fix Dan?

Changed 16 years ago by DanWilson

It isn't fixed yet chuck, we aren't sure what we are going to do here.

I have scheduled this ticket for the 3.1.x next patch, and we'll debate it internally.

You are really working a lot with the remoting service and ajax and such and challenging a lot of what we think. We like that, and appreciate the debate.

You know what would be helpful for us, if you could make a small model glue application that showed how you used the remoting feature and binding and all the stuff you've been reporting on. It would go a long way towards helping us understand the issues you've found.

Code, is worth a thousand words, as they say.

DW

Changed 16 years ago by Chuck Savage <chuck@…>

I added the example to the bind thread in google-groups, here: http://groups.google.com/group/model-glue/browse_frm/thread/b04be5e60a0e4f31

Changed 16 years ago by cfgrok

  • owner set to cfgrok
  • status changed from new to assigned

Changed 16 years ago by cfgrok

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in revision 250

Remoting requests will now run the full event lifecycle, and therefore all the regular event values will be present and accessible in a remote request.

Note: See TracTickets for help on using tickets.