Welcome Guest Search | Active Topics | Sign In | Register

CallbackEventArgs.Data returned in output insted of extraData Options
Joan Darling
Posted: Tuesday, January 6, 2015 7:04:08 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I'm setting the Data property on the server side to the status of the operation but when I try to display the status I discovered that extraData was null and the status text was in the output property. This is the only callbackpanel that acts in this manner. I had to use a try block to keep it from failing. Any ideas why this is occurring?

Code: Visual Basic.NET
If exception IsNot Nothing Then
    e.Data = "error|Update of purpose failed with the following exception - " & exception.Message
Else
    e.Data = "success|The update of purpose was successful..."
End If


Code: JavaScript
function cbpPurposeClientSideAfterExecute(callback, output, extraData) {
    var callback_parm = callback.getParam();
    if (callback_parm.indexOf("save") > -1) {
        var message = null;
        try {
            message = extraData.split("|");
        } catch (err) {
            message = output.split("|");
        }
.
.
.


eo_support
Posted: Tuesday, January 6, 2015 10:10:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

I am not sure if I understand your question correctly. If your code throws an exception, then everything will be discarded and the normal flow will be interrupted. However the exception will be caught and passed back to the client side.

Thanks!
Joan Darling
Posted: Tuesday, January 6, 2015 11:04:21 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I use the Data parameter to return the status of the callback process. In all other cases when I set the parameter it returns via the extraData parameter in the ClientSideAfterExecute method but in this single case the Data parameter is being returned in the output parameter. Why is it, that in this single case the parameter value is being returned via the output parm?

Extract from Help file -
Parameters
callback
The Callback object that triggered the callback.
output
The new output returned by the callback.
extraData
Extra data transferred from the server side via CallbackEventArgs.Data property.
eo_support
Posted: Tuesday, January 6, 2015 3:03:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

I can't tell you anything just from your description. If you can isolate the problem into a test project we will be happy to take a look. See here for more instructions on how to send test project:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.