User Tools


This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:adminmanual:businessmappings [2019/10/06 16:17]
joebordes [Types of Business Mappings]
en:adminmanual:businessmappings [2020/06/07 11:49] (current)
joebordes [Types of Business Mappings]
Line 40: Line 40:
   * [[en:​adminmanual:​businessmappings:​masterdetailmapping|Master Detail Mapping]]   * [[en:​adminmanual:​businessmappings:​masterdetailmapping|Master Detail Mapping]]
   * [[en:​adminmanual:​businessmappings:​iomap|IOMap]]   * [[en:​adminmanual:​businessmappings:​iomap|IOMap]]
 +  * [[en:​adminmanual:​businessmappings:​infomap|Information Map]]
   * [[en:​adminmanual:​businessmappings:​field_dependency|Field Dependency]]   * [[en:​adminmanual:​businessmappings:​field_dependency|Field Dependency]]
   * [[en:​adminmanual:​businessmappings:​validations|Validations]]   * [[en:​adminmanual:​businessmappings:​validations|Validations]]
Line 51: Line 52:
   * <​del>​[[en:​adminmanual:​businessmappings:​search_and_update|Search and Update]]</​del>​ TBD   * <​del>​[[en:​adminmanual:​businessmappings:​search_and_update|Search and Update]]</​del>​ TBD
-Depending on the type of the business mapping the contents of the record changes as explained next.+Depending on the type of business mapping the contents of the record changes as explained next.
Line 123: Line 124:
 <code PHP>​$focus->​search_fields = $cbMap->​ListColumns()->​getSearchFields();</​code>​ <code PHP>​$focus->​search_fields = $cbMap->​ListColumns()->​getSearchFields();</​code>​
 +===== How to add a Business Mapping Type Generator =====
 +Each Business Map record has an action link named "​Generate Map". This link opens a window with a specific editor for each type of map which will help us construct the map in a more or less graphical way.
 +coreBOS gives the programmer of the map the necessary infrastructure to simply implement the editor and not have to worry about the details.
 +If you want to create an editor for your map you must:
 +  * create a class named <​code>​gen<​MapName></​code>​ inside the directory modules/​cbMap/​generatemap
 +  * the class extends **generatecbMap**:​ <​code>​ class genModuleSetMapping extends generatecbMap {</​code>​
 +  * the class must contain two methods:
 +    * **generateMap()** this method will be called once the editor window is opened and will be in charge of sending to the screen all the editor contents.
 +      * The method should include the file **modules/​cbMap/​generatemap/​GenMapHeader.php** before any output. This script will output the normal coreBOS includes like LDS (among others).
 +      * The method should include the file **$smarty->​display('​modules/​cbMap/​GenMapFooter.tpl'​);​** at the end which will close the HTML and BODY opened in the header
 +      * The contents generated by the method must contain a javascript function that captures all the required information and sends it to the **saveMapAction(params);​** function. params is the typical parameter/​value query string used in the browser (separated by &) and will be sent to coreBOS as the POST body of the save event
 +    * **convertToMap()** which will have to read from the $_REQUEST the values it needs and return the constructed map that will be saved by coreBOS
 +You can find an example in the Module Set Mapping