StrataFrame Forum

Description added to BO Mapper

http://forum.strataframe.net/Topic13358.aspx

By Greg McGuffey - 1/11/2008

I'm not sure if I asked for this before, but it recently it reared its head again. I'd like to be able to control what text is shown to the user on the concurrency manager. I know that the Description attribute is used, but I only have control over that with custom properties and BOs derived from the DDT. Most of my tables aren't derived from the DDT, but directly from SQL. So, pretty much, I'm wondering if there could be a field in the BO mapper to enter a name, it could default to the field name, that would populate the Description attribute when the BO is built.



Thanks!
By Bill Cunnien - 1/11/2008

I second the motion.
By StrataFrame Team - 1/11/2008

What if we created a method that you would override within your business object that would get the description from you... by default we would return the field name, but you could instead return something else?

Protected Overrides Function GetConcurrencyDescription(ByVal field As String) As String
    Select Case field
        Case "cust_FirstName"
            Return "First Name"
        Case Else
            Return MyBase.GetConcurrencyDescription(field) '-- Just do the default for all the ones you don't want to override
    End Select
End Function

Would that be doable?

By Bill Cunnien - 1/11/2008

That would certainly work.  I think it would just be cleaner to have that extra column in the business object mapper.  When customizing the field, allow the developer to type in the column description that they want to show for that field in the object.  Sometimes those DB guys can get a bit crazy with their naming conventions, ya know. Wink
By StrataFrame Team - 1/11/2008

Aye... "cust_fn" doesn't always scream "First Name." Smile
By Greg McGuffey - 1/11/2008

I'm thinking that using the BO mapper route would handle most of the cases, where a user friendly name is needed. Also it would be much faster, as each field would simply need to be customized, as opposed to writing code (not hard code to write, but code none the less, more code to write).



There might be times when the overridable method is just the ticket, maybe if using localization, were you need different text for the field name based on locale or some other runtime situation.



How about both? Wink
By Trent L. Taylor - 1/13/2008

Greg,

I think that we will ultimately make a change to the BO Mapper to just allow you to override the description attribute.  This is not a problem when you pull your mappings from the DDT as we pull the description from the description field of the field.  This has actually been brought up before by another developer or two so it is probably something that needs to be added.

By Greg McGuffey - 1/14/2008

Sounds good!



When will this get done? By Wednesday*? Wink





* At my company, there was a joke that whenever a user asks for an enhancement (or completely new feature), we always say "by Wednesday"....of course we were vague on which Wednesday.... Hehe
By Trent L. Taylor - 1/14/2008

* At my company, there was a joke that whenever a user asks for an enhancement (or completely new feature), we always say "by Wednesday"....of course we were vague on which Wednesday....

Sure...January 16...................................................................2009 BigGrin

By Greg McGuffey - 1/14/2008

LOL...I'm awaiting it with baited breath w00t