StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Delphi AfterPost Event Equivalent
Delphi AfterPost Event Equivalent
Post Reply
Like
0
Delphi AfterPost Event Equivalent
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
lastcanary
lastcanary
posted 12 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 81,
Visits: 270
I was using Delphi AfterPost Event in my Delphi applications,
AfterPost event is fired after the data on the dataset is updated but before reflected to the database. If this is converted to the Business Object terminology when the business object is updated but before the update is reflected to the database. Is there an equivalent event in StrataFrame Business Objects?
If not, could you please suggest a method to handle it manually?
Reply
Like
0
Trent Taylor
Trent Taylor
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
Well, there are several events to handle this. There is the BeforeSave event, AfterAddNew event, etc. The BeforeSave will occur before the records are saved to the database.
Reply
Like
0
lastcanary
lastcanary
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Users
Posts: 81,
Visits: 270
Let me explain my situation in more details.
I have a listview and I am adding child records to it. When I add a record to the listview I would like to have an event triggering at that point. In the listview the record is just added to the Business Object but it is not added to the actual database. BeforeSave event is triggered after I click on save and try to save the record to the actual database but this is too late for me.
I would like to have an event at the Business Object level. I would not like to have a listview event so that my code resides only on Business Object
Edited
12 Years Ago by
lastcanary
Reply
Like
0
Ivan George Borges
Ivan George Borges
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
You could use the ListView event just to call a Method on your Business Object. This way, your logic would reside in the BO.
Reply
Like
0
Edhy Rijo
E
Edhy Rijo
posted 12 Years Ago
ANSWER
Post Details
Share Post
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Hi Lascanary,
lastcanary (1/19/2012)
I would like to have an event at the Business Object level. I would not like to have a listview event so that my code resides only on Business Object
All the events are at the business object level, not the list view. If it is too hard to explain, I think that if you create a small sample application showing the issue it will be easier to help you find the correct event.
As Trent said, the Business Object Before/After Save/Add events are the logical places to write your code.
I was using Delphi AfterPost Event in my Delphi applications,
AfterPost event is fired after the data on the dataset is updated but before reflected to the database.
The Business Object BeforeSave would be the equivalent to Delphi AfterPost based on your statement above.
Edhy Rijo
Reply
Like
0
lastcanary
lastcanary
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Users
Posts: 81,
Visits: 270
I will try to explain the situation in more details.
Please try to think a form that has textbox controls and a listview control. When I add a record to the listview I would like to trigger an event so that it automatically calculates some formula using the data from the listview and other textboxes and writes the result to another textbox.
Business Object BeforeSave event is triggered when I press Save button but in this case I not pressing the save button.
I hope that this clarifies the problem.
Reply
Like
0
Edhy Rijo
E
Edhy Rijo
posted 12 Years Ago
ANSWER
Post Details
Share Post
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Sorry but you really need to do a quick sample application.
When you add a record to the list view, you are simply adding a record to the BO, so the PostAdd event will trigger, if you need to track when some information changes in each textbox, then you can use the BO Field Changing events. This would be so much easier with a sample application where you can see the outcome.
Edhy Rijo
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search