
799
DEVELOPING
COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Las
t
upda
te
d 8/5/2010
The cfformgroup and cfformitem tags
All
cfformgroup
tags and all
cfformitem
tags, except
type="html"
and
type="text",
generate
xf:group
elements. The following rules determine the element structure:
•
The CFML tag
type
attribute determines the
xf:groupappearance
attribute.
•
ColdFusion converts
type
attribute values to all-lowercase characters.
•
For
cfformgroup
tags only, the CFML
label
attribute determines the
xf:grouplabel
attribute.
•
All other CFML attributes are placed in
cf:attribute
elements in a
xf:extension
element.
•
The
cfformitem
tags generate an
xf:output
element with the body text in a <![CDATA[ section.
The following example shows two
cformitem
tags, and the resulting XML:
CFML
<cfformitem name="text1" type="text" style="color:green">
Please tell us a little about yourself and your thoughts.
</cfformitem>
<cfformitem type="hrule" height="3" width="200" testattribute="testvalue" />
XML
<xf:output><![CDATA[Please tell us a little about yourself and your
thoughts.]]>
<xf:extension>
<cf:attribute name="style">color:green</cf:attribute>
</xf:extension>
</xf:output>
<xf:group appearance="hrule">
<xf:extension>
<cf:attribute name="width">200</cf:attribute>
<cf:attribute name="height">3</cf:attribute>
<cf:attribute name="testattribute">testvalue</cf:attribute>
</xf:extension>
</xf:group>
Example: control element XML
The following code shows the XML for the input controls for the form shown in the image in “
About XML skinnable
forms
” on page 783. This code immediately follows the end of the
xf:model
element.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...