CslaActionExtender sample?

CslaActionExtender sample?

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


stefan posted on Saturday, September 27, 2008

Hi Rocky,

I am just exploring the new CslaActionExtender for Windows Forms applications.
Can you provide any examples on how to use this?

Stefan

detritus replied on Saturday, September 27, 2008

Just played with it, add it to a form and set its datasource, change some properties if you will. The buttons on the form gets new properties, named ActionType, CommandType, DisableWhenClean, PostSaveAction, RebindSaveAction. I think these can make RebindUI method in forms obselete.

I cannot make it work, though. It seems at some point public method ResetActionBehaviors should be called, but even called manually returns error.

Sinan

stefan replied on Sunday, September 28, 2008

Well, I had set it up like you mentioned, but then remembered that Rocky mentioned (I think it was in the last DNR show),
that we have to add the control and set all properties in code, using the designer would not work.

If you do so, it works to some extent (still beta).

Issues I found:
The WarnOnCancelMessage should not appear when the object is plain New without any property changes yet.
Cancelling should always disable the controls. It does not disable the buttons after a save (see below).
The cancel action only works till the first save! Try to cancel a modification on a previously saved object,
and you will be forced to restart the application as the form does not respond anymore!
[EDIT]
Well, after adding a BindingSourceRefresh control to the form it works better, but still not on a reliable basis.

But after all, this is the control all WinForm-developers have been waiting for! Smile [:)]

Stefan

RockfordLhotka replied on Wednesday, October 01, 2008

Miguel Castro wrote the control and contributed it to CSLA, and he just provided a sample:

http://www.lhotka.net/cslacvs/viewvc.cgi/samples/trunk/CslaNet/cs/ActionExtenderSample/

Hopefully that helps.

fredg replied on Thursday, February 23, 2012

Hi, the link for the CslaActionExtender sample is broken. Is there any other sample code?

RockfordLhotka replied on Thursday, February 23, 2012

The sample is under either Tags or Branches (both actually) in the older versions of CSLA. We didn't have time to update it for CSLA 4 and .NET 4, so it got dropped out of trunk.

Copyright (c) Marimer LLC