DataFeed and DataEntry triggers don
- Hi...
I have a query ...
I am trying to add external Image as DataEntry into DataFeed... using PostUpdateTrigger on update of that feed, in Silverlight MEWA.
Trigger for that i've written as...
meshApp in above code is current running MEWA Object.DataFeed dataFeeds = (from dataFd in meshApp.CreateQuery<DataFeed>().Execute()
where dataFd.Resource.Title == "LiveMeshFiles"
select dataFd).FirstOrDefault<DataFeed>();
Uri dataFeedUri = dataFeed.Resource.SelfLink;Uri dataEntryUri = dataFeed.DataEntries.SelfLink; Uri webServiceUri =
new Uri ("http://farm3.static.flickr.com/2095/2536266639_96da188f07_o_d.jpg");dataFeed.Resource.Trigger.PostUpdateTrigger = Statement.Sequence( Statement.ReadResource<DataFeedResource>("read", dataFeedUri, false), Statement.CreateMediaResource<DataEntryResource>( "creat", dataEntryUri, webServiceUri, Statement.Bind( "CollectionUrl", "read", "Response.MediaResourcesLink"))).Compile(); dataFeed.UpdateCompleted +=
new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(dataFeed_UpdateCompleted);dataFeed.UpdateAsync();
** i've created/added a DataFeed "LiveMeshFiles" on "meshAppLoaded" event of MEWA.
when i execute this code, Image cant get added to DataFeed.
but instead of this when i create a Trigger for meshObject.PostUpdate like "meshObject.Resource.Triggers.PostUpdateTrigger" with same StatementSequence, and just called
meshApp.UpdateCompleted += new EventHandler(meshApp_UpdateCompleted);
meshApp.UpdateAsync();
image gets added into that DataFeed...
why? or we cant add DataEntry into DataFeed using PostUpdateTrigger on it?
Thanks
.NetPro- Edited by.NetPro Tuesday, February 10, 2009 2:39 PMDataFeed added note
- Edited by.NetPro Tuesday, February 10, 2009 2:41 PMDataFeed
- Split byVikas-AhujaMSFT, ModeratorSaturday, February 14, 2009 4:14 PMdifferent context and question
- Edited by.NetPro Saturday, April 04, 2009 7:33 AM
Answers
- Raviraj, I have entered this as a bug on the Connect site. Please click the link below to to rate and validate the bug to ensure it gets fixed. If you have any additional details, feel free to add them to the bug report.
DataEntry and DataFeed triggers don't work
http://orand.blogspot.com- Proposed As Answer byVikas-AhujaMSFT, ModeratorSaturday, February 14, 2009 4:17 PM
- Marked As Answer byYi-Lun LuoMSFT, ModeratorMonday, February 16, 2009 2:21 AM
All Replies
- Raviraj, I think you've found a bug. You are correct, your PostUpdateTrigger only appears to work on MeshObject, not on DataFeed or DataEntry. You can submit a bug report here: https://connect.microsoft.com/liveframework/feedback/CreateFeedback.aspx
One possible workaround is to manually run your script with RunAtServer() after you call Update(). This works for your example script since it doesn't reference the trigger's resource parameter.
http://orand.blogspot.com - Hi Oran,
I am using Silverlight enabled MEWA application... where i've written above Trigger...so call to RunAtServer() will not be possible...
Thanks
.NetPro- Edited by.NetPro Saturday, April 04, 2009 7:33 AM
- The Silverlight SDK supports RunAtServer(), but you are right, I don't think that will work for a MEWA that is running from the user's desktop. It should only work for a MEWA running on the Live Desktop.
A bigger issue is that the local LOE doesn't support triggers. Part of the reason is that the local LOE doesn't support execution of scripts. This functionality is expected to be added in a future release.
http://orand.blogspot.com - Raviraj, I have entered this as a bug on the Connect site. Please click the link below to to rate and validate the bug to ensure it gets fixed. If you have any additional details, feel free to add them to the bug report.
DataEntry and DataFeed triggers don't work
http://orand.blogspot.com- Proposed As Answer byVikas-AhujaMSFT, ModeratorSaturday, February 14, 2009 4:17 PM
- Marked As Answer byYi-Lun LuoMSFT, ModeratorMonday, February 16, 2009 2:21 AM
- Raviraj/Oran - I split up the original thread as this is different question.
Original question was posted in: http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/9f43d49a-547e-44aa-b0f8-91c581a87111
Thanks Oran for logging bug on this.
This posting is provided "AS IS" with no warranties, and confers no rights.

