Object Design


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I'll work on that.  Glad you got your problem solved.
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
BlushNever mind. I found the the problem.. the "Handles" statement somehow got lost on my ListPopulating sub.

Thanks for the insight on complex objects. It would be helpful if you could provide a more complex example of a complex BO. The original complex example was a ggod intor but it would be nice to have a good 'production' example.

-Larry

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Aha, the problem is not that your class is nested... the problem is most likely that one of the parameters was not passed to the CopyDataFrom method.  Check to make sure you're passing both parameters to the business object using either the Requery() method or the ListPopulating event.

1)  Requery(MyBO, BusinessCloneDataType.ClearAndFillFromCompleteTable)

2)  Private Sub ListPopulating(...)

e.Parameters(0).Value = MyBO

e.Parameters(1).Value = BusinessCloneDataType.ClearAndFillFromCompleteTable

End Sub

It could also be that even though you're passing the parameters, the business object you're passing might be null (Nothing).

Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Ben,

Attached is the stack trace.

-Larry

Attachments
StackTrace.txt (124 views, 3.00 KB)
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
No, there shouldn't have been a change in 1.4.1 that would have affected the list view population.  When you get the exception trying to create your list view, what are the inner exceptions?  Oh, and if you run your application outside of debug (sometimes Release works, but sometimes, you have to just go click on the .exe in the /bin folder of the project) you should get the red application error dialog that will list the exception and all of its inner exceptions as well as a concatenated stack trace from all of the exceptions. 

Let me know, because something is fishy there...

And yes, you can certainly create complex business objects that contain instances of other business objects... we do.

Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

This is more of an appropriate use question than an issue.  I have been experimenting with complex business objects where a child object is nested within the parent class. The idea was keep the logic for controlling the relationships between objects, like deleting child object’s records when deleting the parent (to avoid foreign key constraints) within the business object and out of the UI. This approach created issues with data binding on the nested object which can be overcome by adding custom properties on the parent to expose the child’s properties. This was actually working pretty well until I upgraded to v1.41 6/6/06 release. With that update I found that I can no longer populate a ListView from a nested object. I now get an error similar to “Could not create and fill the business object of type ‘TestLibrary.Order+LineItemInfo” ( LineItemInfo is nested within the Order class).  Is this change in behavior actually a fix?

 

More importantly is my complex object approach something that I shouldn’t be trying to do with SF? I came to SF from CSLA and haven’t totally adjusted to the one-table-one-object way of thinking where everything gets tied together on a form.

 

-Larry

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search