spec/lib/data/bk/field.cfm
2025-06-02 16:16:51 +03:00

24 lines
846 B
Plaintext

<cfsilent>
<!--- 20181209 v0.3 --->
<!---v0.3 добавлен атрибут cfSqlType--->
<cfif thisTag.executionMode IS "end" OR !thisTag.hasEndTag>
<cfassociate basetag="cf_field_set" datacollection="fieldsArray"/>
<cfparam name="ATTRIBUTES.expression" default=""/>
<cfparam name="ATTRIBUTES.title" default=""/>
<cfparam name="ATTRIBUTES.name" default=""/>
<cfparam name="ATTRIBUTES.cfSqlType" default="CF_SQL_VARCHAR"/>
<cfif ATTRIBUTES.expression IS "">
<cfset ATTRIBUTES.expression=thisTag.generatedContent/>
</cfif>
<cfif ATTRIBUTES.name IS "">
<cfset regex="([[:word:]]+)[[:space:]]*$"/>
<cfset matches=REFindNoCase(regex, ATTRIBUTES.expression, 1, true)/>
<cfif arrayLen(matches.pos) GT 1>
<cfset ATTRIBUTES.name=mid(ATTRIBUTES.expression, matches.pos[2], matches.len[2])/>
</cfif>
</cfif>
</cfif>
</cfsilent>