Can't change RequiredFields in the BO dropped on a Form


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

I made a mistake with the RequiredFields property and wanted to change the 'on form' version just for testing purposes before I changed the actual BO itself. However, it doesn't show in the Properties list when the on form version of the BO is selected.

Is this by design?

Cheers, Peter

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, this is by design... the business objects don't allow the RequiredFields to be set on a per-instance basis because then they could be serialized on a by instance basis, and if you changed the fields in the BO's component designer, the changes wouldn't always get inherited by the instances on the forms.  That and the BO class is the central place for the business logic, and the RequiredFields are business logic so...

However, you can certainly modify the RequiredFields collection programmatically for testing purposes (or to make them different on a per-form basis if necessary).  I would recommend copying the code from the InitializeComponent() of the BO because there are a few caveats to the RequireFields collection; namely, you have to use SqlDbType.Text for all System.String properties (at that point, the SqlType doesn't matter, just that it's a string).

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