Where is EditableRootListBase<T,C>.BeginSaveItem ?

Where is EditableRootListBase<T,C>.BeginSaveItem ?

Old forum URL: forums.lhotka.net/forums/t/6574.aspx


markell posted on Saturday, March 07, 2009

Dear sirs.
BusinessBase<T> has methods Save and BeginSave.
EditableRootListBase<T, C> has only method SaveItem.
But what if I want to save a list item asynchronously? I would have expected it to have BeginSaveItem, but it has none.

What should I do?

Thanks.

RockfordLhotka replied on Saturday, March 07, 2009

I'm not entirely sure this is even possible.

I mean it is obviously possible, but I'm not sure it would work for the intended purpose of ERLB, which is to transparently support in-place grid editing. In that case, the async behavior may be unworkable, because the user would be on some other row when the async result comes back and (potentially) alters the row that was edited previously.

markell replied on Sunday, March 15, 2009

(Hmm, strange, I do not seem to get notified when you answer...)

I understand, what you mean. However, I am forced (as I see no better alternative) to use an ERLB in my application to hold child Folders of a parent Folder, like this:

[NonSerialized]
private FolderList m_children;


where FolderList inherits from ERLB. Since every Folder may reside in a FolderList (at most one), Folder.Save is overrided and delegates to parent FolderList.SaveItem, if relevant.
When I wished to implement the same logic for Folder.BeginSave, I saw that I cannot, since there
is no FolderList.BeginSaveItem.

Thus I am left is an incomplete API, where Folder.Save behaves correctly, because it may safely reroute to the parent ERLB, while Folder.BeginSave does not.

That is the origin of my question.

Again, I may be doing this all wrong, so I will gladly accept any concrete suggestions.

Thanks.

Copyright (c) Marimer LLC