StrataFrame Forum

ObjectMapper Enhancement

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

By Larry Caylor - 12/27/2005

Just download the latest version of the framework, and found that it fixed all of the bugs that I’d reported, Thanks! Looking at the download file date I noticed that it was dated 12/24/2005 11:27PM.  Now that’s dedication! I don’t know of any other vendor that would be working that late on Christmas Eve.  

 

In order to become familiar with StrataFrame I’m taking a small application that I developed in CSLA and Active Objects, and converting it. Using StrataFrame, what is the recommended way of preventing users from entering leading and trailing blanks in text fields?  I consider this business logic and accomplished it in CSLA by ‘trimming” the user’s input in the Set Block of the of the property’s public method rather than doing it in the UI. Since I was hand coding the business object in CSLA this was easy to add. I know I could accomplish this using custom code in ObjectMapper but then I loose one of the advantages StrataFrame; less coding. Have you considered adding trim, toupper, and tolower options to the customize field window in ObjectMapper?

 

-Larry

By StrataFrame Team - 1/6/2006

Honestly, no we haven't considered allowing this. However, within the Business Object Mapper, you could customize a field property to return custom code. Or, you could set the value equal to its trimmed value in the CheckRulesOnCurrentRow event handler (since it's business logic Smile).
By Larry Caylor - 1/6/2006

No Big deal. I found that I can get the results I want by adding the formatting code to the FieldPropertyChanging event handler. It works well since the event argument contain both the field name and value.