3 Form field event binding, user-defined rendering
Last updated
Last updated
Field value change will trigger the bound function, can be bound multiple times BindFieldChangeEvent:function (fieldMarkStr, funobj)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
Binding for newly added detail line fields and loaded fine line fields, and value changes trigger bound event bindDetailFieldChangeEvent:function (fieldMarkStr, funobj)
Parameter Description
Parameter | type | Required | Remarks |
---|---|---|---|
Recommend to use this method to develop, because this interface click, double-click and other actions are not bound to the field element, the interface bound to the cell All functions can be implemented in a formula
bindFieldAction:function (type, fieldids, fn)
Parameter Description
Example
Minimum version requirements :KB900190407
this interface is effective only for single-line text-box field types, Database field type is varchar
Display effect, events, field value could be controlled by each other, The editable field values modified through interface 3.3 will also be recorded.
System will pass in relevant props, React Developer Tools could used to grab data, Call on demand
proxyFieldComp:function (fieldMark, el, range)
Parameter Description
Example
Minimum Version Requirements : KB900190407
Add addtional user-defined rendering for after Method Based on Standard Fields Display Content
This interface parameter description and usage is similar to interface 4.4
afterFieldComp:function (field Mark, el, range)
Example
Minimum version: KB900190701
Customize render form fields with function return values, support all field types, implement add/override/relayout based on original components, etc.
It is recommended to combine ecode together, to call before module loading, use JSX, to customization
This interface related to form field rendering with a higher priority than 4.4,4.5, that is, fields using this interface proxy, such as 4.4,4.5 will be invalid immediately
proxyFieldContentComp:function (fieldid, FN)
Inteface Parameter Description
Function Parameters of Proxy
Example
Minimum Version: KB900190701
Get the field component according to the field identification, that is, the field component can be extracted separately and rendered anywhere. Note that the read-only editable properties of the field still need to be set up in the background in advance
It is recommended to work with the ecode, using the JSX, and then combined with the designer custom properties or interface 4.6, can achieve a certain area custom typesetting layout rendering multiple form field
generateFieldContentComp:function(fieldMark)
Interface Parameters Description
Example
Type | Remarks |
---|---|
Parameter | type | Required | Remarks |
---|---|---|---|
Parameter | type | Required | Remarks |
---|---|---|---|
Parameter | type | Required | Remarks |
---|---|---|---|
Parameter | type | Required | Remarks |
---|---|---|---|
Parameter | type | Required | Remarks |
---|---|---|---|
fieldMarkStr
String
Yes
The binding field is marked, separated by multiple spliced commas, such as: field110( main field), field111_2( fine field )……)
funobj
Function
Yes
The function passes the following three parameters by default, parameter 1: the DOM object of the trigger field, parameter 2: the mark of the trigger field (field27555, etc.), parameter 3: the modified value
fieldMarkStr
String
Yes
Binding detail fields, can not be underlined, can be separated by multiple splicing commas, for example: field110,field111
funobj
Function
Yes
Field value changes trigger custom functions, which by default pass the following three parameters, parameter 1: field mark (field27583), parameter 2: line mark, parameter 3: modified value
onblur
Gets focus events that support only single-line text field types
onfocus
Lost focus events, single-line text type only supported
onclick
Click the event, where the field is in the cell area click trigger
ondbclick
Double-click event, where field cell area double-click trigger
mouseover
Mouse move event, mouse move field cell area trigger
mouseout
Mouse out of the event, mouse out of the field where the cell area triggered
type
String
Yes
Action types, see table above
fieldids
String
Yes
Fields id collections, separated by multiple commas, and detail fields are not underlined for all lines
fn
Function
Yes
Trigger function, which enters the parameter to receive two parameters, fieldid and rowIndex line numbers
fieldMark
String
Yes
field designation, format field${ field ID}_field${ line number}
el
React Comp
Yes
Components rendered
range
String
No
Scope of action, default all ,(1: read-only ,2: editable ,3: required), comma separated after combination
field
String
Yes
Format ID, main table/detail fields
fn
Function
Yes
Proxy function, which must have a return value that returns a custom rendered component
info
JSON
Yes
Field base information including field values, field properties, etc
compFn
Function
Yes
Proxy former field component function through which the original component can be obtained
fieldMark
String
Yes
field designation, format field${field_ID}_field${Detail Row ID}