Differences

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
docs:3500:0800:0830 [2023/04/05 04:42] seandocs:3500:0800:0830 [2025/06/12 04:00] (current) – Change to AwareIM aware_support3
Line 1: Line 1:
-{{tag>}}+{{tag>Programmers_Reference Client_Side_Plugins Modify_Forms}}
 [<10>] [<10>]
 ====== Modifying default behavior and presentation of forms ===== ====== Modifying default behavior and presentation of forms =====
  
-To modify the default behavior and presentation of forms you need to go to a particular object form that you want to modify and click on the Scripts property under the Advanced” category in the list of properties of the form. You can define initialization” script or render” script or both (see “Architecture of the Client-side Code”).+To modify the default behavior and presentation of forms you need to go to a particular object form that you want to modify and click on the Scripts property under the "Advancedcategory in the list of properties of the form. You can define "initializationscript or "renderscript or both (see [[docs:3500:0800:0810|]]).
  
 The Javascript objects that are exposed to the initialization script for forms are the same as for queries: The Javascript objects that are exposed to the initialization script for forms are the same as for queries:
  
-  - “config” object +  * "configobject 
-  - “markup” object +  * "markupobject 
-  - “parser” object +  * "parserobject 
-  - “widgets” object +  * "widgetsobject
-Just like with queries, the parser object represents the form controller and the “markup” object represents the HTML markup of the form. However, there is a significant difference in the “config” object exposed by forms. Whereas for queries the “config” object represents some widget of the Kendo UI library, that is mainly responsible for the implementation of the query, there is no such widget for forms. A form is just an HTML code that consists of rows and columns of the Bootstrap grid system (get**bootstrap**.com/css/). Each row and column contains attributes of the form – depending on the type of the attribute they are either implemented as plain HTML or they may also include a configuration for a Kendo UI widget. +
  
-This HTML is also wrapped in “panel” that includes HTML of toolbars around the form (if they are defined) and also the implementation of the default or custom panel headerNote that the HTML that includes toolbars and panel header is also included as part of the query markup.+Just like with queries, the parser object represents the form controller and the "markup" object represents the HTML markup of the form. However, there is a significant difference in the "config" object exposed by forms. Whereas for queries the "config" object represents some widget of the Kendo UI library, that is mainly responsible for the implementation of the query, there is no such widget for formsA form is just an HTML code that consists of rows and columns of the Bootstrap grid system ([[http://getbootstrap.com/css/|]]). Each row and column contains attributes of the form – depending on the type of the attribute they are either implemented as plain HTML or they may also include a configuration for a Kendo UI widget
  
-So the “config” object for forms represents the configuration of a special Aware IM object called “panelYou can find the code of this object in AwareIM/Tomcat/webapps/AwareIM/aware_kendo/panel.js file. At the beginning of the file there is a description of all configturation parameters supported by this object. You can change these parameters by your script..+This HTML is also wrapped in a "panel" that includes HTML of toolbars around the form (if they are defined) and also the implementation of the default or custom panel headerNote that the HTML that includes toolbars and panel header is also included as part of the form markup.
  
-For example, the following script will turn off the display of the header for the form, no matter what is specified in the //**Aware IM**// properties of the form:+So the "config" object for forms represents the configuration of a special AwareIM object called "panel". You can find the code of this object in ''AwareIM/Tomcat/webapps/AwareIM/aware_kendo/panel.js'' file. At the beginning of the file there is a description of all configturation parameters supported by this object. You can change these parameters by your script..
  
-config.preventHeader = true;+For example, the following script will turn off the display of the header for the form, no matter what is specified in the //**AwareIM**// properties of the form:
  
-However, you are unlikely to need it because most of these parameters can be customized in //**Aware IM**// without having to use a script.+<code javascript>config.preventHeader = true;</code>
  
-You may, however, want to modify the markup of the form – for example, you may want to modify the generated layout or styling of some attributes. You can use it through the “markup” object (or in the “render” script after the form has been drawn). The description of the HTML markup is beyond the scope of this document. If you want to study it you can just generate form and use the browser inspector to display the HTML of the form. You can then use your scripts to modify this markup.+However, you are unlikely to need it because most of these parameters can be customized in //**AwareIM**// without having to use script.
  
-You can, however, modify the widgets used by the form using the “widgets” object – you will probably modify widgets that represent attributes in their own Advanced scripts, but you can also modify other widgets used by a form, such as toolbars, for example – this has been already explained in the previous section.+You may, however, want to modify the markup of the form – for example, you may want to modify the generated layout or styling of some attributes. You can use it through the "markup" object (or in the "render" script after the form has been drawn). The description of the HTML markup is beyond the scope of this document. If you want to study it you can just generate a form and use the browser inspector to display the HTML of the form. You can then use your scripts to modify this markup.
  
-The parser” object allows you to access certain properties of the system that you may need (especially if you are modifying the markup of the form). The type of this object is AwareApp_FormParser. You can look up full methods of this object in the file AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/formParser.js+You can, however, modify the widgets used by the form using the "widgets" object – you will probably modify widgets that represent attributes in their own Advanced scripts, but you can also modify other widgets used by a form, such as toolbars, for example – this has been already explained in the previous section. 
 + 
 +The "parserobject allows you to access certain properties of the system that you may need (especially if you are modifying the markup of the form). The type of this object is ''AwareApp_FormParser''. You can look up full methods of this object in the file ''AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/formParser.js''
  
 Some useful methods of the parser object that you can use here are: Some useful methods of the parser object that you can use here are:
  
-  getField (attributeName, sectionName) – get the field of the form for the specified attribute and form section +  * ''getField (attributeName, sectionName)'' – get the field of the form for the specified attribute and form section 
-  getReferenceParser (refAttrName) – get the parser” of the reference attribute of the form, responsible for displaying a table, calendar etc – see 8.1 +  * ''getReferenceParser (refAttrName)'' – get the "parserof the reference attribute of the form, responsible for displaying a table, calendar etc – see [[docs:3500:0800:0810|]] 
-The second script (render” script) that you can define in the Scripts dialog allows you to modify the form after it has been drawn. Here you can only use jQuery methods to modify the resulting document markup. The only object available for you here is the parser” object representing the form controller.+ 
 +The second script ("renderscript) that you can define in the Scripts dialog allows you to modify the form after it has been drawn. Here you can only use jQuery methods to modify the resulting document markup. The only object available for you here is the "parserobject representing the form controller.
  
  
 {{simplenavi>docs:3500:0800:0830:}} {{simplenavi>docs:3500:0800:0830:}}
  • Last modified: 2023/04/05 04:42