Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 777

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Controlling sizes in Flash forms
Sizing elements in a Flash form is something of an art, rather than a science. As a general rule, if you don't specify the
and
attributes, Flash tends to do a good job of laying out the form. However, keep in mind the following
height
width
considerations:
• If you do not specify the
height
visible browser window, if the form is not in a table, or the table cell, if the form is in a table, even if they are not
required for the form contents. Any HTML output that precedes or follows the form causes the output page to
exceed the size of the browser window.
• If you do not specify the height or width of a control, including a form group, Flash adjusts the dimensions, trying
to fit the controls in the available space. For example, Flash often extends input boxes to the width of the containing
control, if not otherwise specified.
In general, it is best to use the following process when you design your Flash form.
Determine the sizes of a Flash form and its controls
1
When you first create the form, don't specify any
the form and examine the results to determine height and width values to use.
Specify
and
2
height
width
absolute pixel values, or percentage values relative to the size of the containing window.
Specify any
or
3
height
width
Repeat step 3 for various tags, and possibly step 2, until your form has a pleasing appearance.
4
Repeating Flash form elements based on query data
The
repeatercfformgroup
child controls for each row in the query. For each set of child controls,
in the current query row. This
based on a query, without requiring ColdFusion to recompile the Flash SWF file for the form. This significantly
enhances server performance.
Note: For more information on binding data, see
Optionally, you can specify a start row and a maximum number of rows to use in the
ColdFusion tags,
index values start at 0, not 1. To specify a repeater that starts on the first line of the query
repeater
object and uses no more than 15 rows, use a tag such as the following:
<cfformgroup type="repeater" query="q1" startrow="0" maxrows="15">
One example that can use a repeater is a form that lets a teacher select a specific class and update the student grades.
Each class can have a different number of students, so the form must have a varying number of input lines. Another
example is a shopping cart application that displays the product name and quantity ordered and lets users change the
quantity.
The following example uses the
a query, and uses the repeater to iterate over a query and create a firstname and lastname input box for each row in the
query.
and
attributes in the cfform tag, Flash reserves the full dimensions of the
width
height
attributes in the
tag for the desired dimensions of the form. You can specify
cfform
attributes on individual tags. These values must be in pixels.
type tells Flash Player to iterate over a query and create a set of the
type lets you create Flash forms where the number of controls can change
cfformgroup
"Binding data in Flash
tag with a
cfformgroup
repeatertype
Last updated 1/20/2012
and
attributes on the form or its child tags. Run
width
attributes in the child tags can access fields
bind
forms" on page 776.
repeater
attribute value to populate a form. It creates
772
tag's
cfformgroup
. Unlike most

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents