Welcome Guest Search | Active Topics | Sign In | Register

Need to pass an object from progress bar run task to callbackpanel Options
Abdu
Posted: Friday, November 5, 2010 5:29:22 PM
Rank: Member
Groups: Member

Joined: 9/1/2010
Posts: 28
I have a server code task which runs during a progress bar display (startTask). In the server side OnRunTask handler I save an object in session. Then in the ClientSideOnTaskDone client handler I update a callbackpanel (in a master page). In the Callbackpanel's OnExecute server handler, I try to get the object from the session but it's null?

What's the best way to pass an object in the workflow I described?

I saw a post about saving the session in a file as in: e.UpdateProgress(100, "../temp/" + session_file);
Is this the only way to pass the object? It seems I have to serialize the object in the file and then deserialize it upon reading. I prefer not to deal with files.

I am thinking of not using the runTask. i don't need to send updates to the progress bar. Just to close it when server code is done.
eo_support
Posted: Friday, November 5, 2010 6:31:12 PM
Rank: Administration
Groups: Administration

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

You can try to use setTimeout to delay your callback and see if it works. Using a separate file obviously will work, but then you will have to delete it.

Thanks
Abdu
Posted: Friday, November 5, 2010 7:45:58 PM
Rank: Member
Groups: Member

Joined: 9/1/2010
Posts: 28
Thanks. I had a sleep of 3 seconds while I was testing so it doesn't seem to be a delay issue.
I ended up serializing the object to XML, sending it to the client which sent it to the callbackpanel which deserialized it.
eo_support
Posted: Friday, November 5, 2010 8:17:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
I do not know why the session variable is not saved. However I am glad to hear that you found a solution.


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.