Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 673

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
[Bindable]
var docItem:Array = [{type:"header",content:"<font size='-3'>
<i>Salary Report</i></font>"},{type:"footer",
content:"<font size='-3'>
Page #cfdocument.currentpagenumber#</font>"}];
[Bindable]var docSectionItem:Array = [{content:"<table width='95%'
border='2' cellspacing='2' cellpadding='2' >
<tr><th>Salary</th></tr><tr>
<td><font size='-1'>John</font></td>
<td align='right'><font size='-1'>Guess What</font></td></tr>
<tr><td align='right'><font size='-1'>Total</font></td>
<td align='right'><font size='-1'>Peanuts</font></td></tr>",
documentitem:docItem},{content:"content2",documentitem:docItem}];
.
.
.
cfDoc.documentSection = docSectionItem;
The following example shows some typical document use:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" xmlns:cf="coldfusion.service.mxml.*"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import coldfusion.service.PdfParam;
[Bindable]
var docItem:Array = [{type:"header",content:"
<font size='-3'><i>Salary Report</i></font>"},
{type:"footer",content:"<font size='-3'>
Page <cfoutput>#cfdocument.currentpagenumber#
</cfoutput></font>"}];
[Bindable]
var docSection:Array =
[{content:"content1"},{content:"content2"},
{content:"content3"}];
[Bindable]
var docSectionItem:Array =
[{content:"content1",documentitem:docItem},
{content:"content2",documentitem:docItem},
{content:"content3",documentitem:docItem}];
[Bindable]
var res:String = new String();
private function init():void
{
doctestnow.execute();
}
private function handleResult(event:ResultEvent):void
{
res=event.result.toString();
Last updated 1/20/2012
668

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents