Flynet Studio Code Generation Properties

ListUserRegion - Custom Code

ListUserRegion - Custom Code

Previous topic Next topic  

ListUserRegion - Custom Code

Previous topic Next topic  

The "Custom Methods" region In user list classes, which are handler classes for multirow FieldMaps - one per Multirow fieldmap used in a project).

 

The Custom Code properties are special code-oriented string properties with a dedicated editor and the capability for import/export functionality between the Tester GUI generations and the full application generation.

 

The Custom Methods region in list classes is the preserved region that the code generator will not write-through when regenerating and existing module.  While the (Preserve) text on the region will prevent overwriting, it doesn't ensure that any changes made during a unit test of a transaction will be propagated to other tests and to the full web service solution.

 

When a user list class needs to be customized, if possible, customize it using the smaller user region...however, if more than that is needed, the entire user list class module can be propagated using the ListClass property.

 

Example of a ListUserRegion for one of the sample Insure screens--this is what would be copied in full into this property to propagate changes across all generations in involving this multirow fieldmap:

 

 #region Custom Methods (Preserve)

 // All user-written code in this region is preserved during code generation, simplifying

 // any ongoing merge requirements

 /// <summary>

 /// Check to see if the row being read is blank / empty

 /// </summary>

 /// <param name="mp">Active PolicyList_RowMap</param>

 /// <returns>true if the key column or other indicator indicates this is not valid data</returns>

 bool LineIsBlank(InsureUI2.AcctTrans_rowDataMap mp)

 {

         return (mp.Date.Trim() == "");

 }

         /// <summary>

 /// When the end of a screen is reached without a blank row, this method will

 /// provide an indication from the active screen if more rows are available

 /// </summary>

 /// <returns>true of indications on the screen are that more rows exist</returns>

 protected override bool MoreRowsAvailable()

 {

         //TODO verify that the more rows available logic is accurate

         return (ts.GetFieldText(MapID.AcctTrans, FieldID.MoreIndicatorX) == "MORE...");

 }

 #endregion Custom Methods