<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vikas Chandran - Adobe Platform Team</title>
	<atom:link href="http://blogs.adobe.com/vikaschandran/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/vikaschandran</link>
	<description>Adobe Technical Consultant [ Flex - Coldfusion - Flex : QTP Automation integration Application Debugging and Analysis ]</description>
	<lastBuildDate>Thu, 07 Jun 2012 12:24:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Enabling Flash Player logs Flex Applications</title>
		<link>http://blogs.adobe.com/vikaschandran/2012/02/07/enabling-flash-player-logs-flex-applications/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2012/02/07/enabling-flash-player-logs-flex-applications/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 12:24:00 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[LiveCycle Data Services [LCDS]]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=646</guid>
		<description><![CDATA[Issue : Enabling Flash Player logs Flex Applications [Windows 7, 2008, Vista] Solution : To enable flash logs, All you need to do is to create file called &#8220;mm.cfg&#8221; at the location For eg : C:\Users\&#60; your windows username&#62; A &#8230; <a href="http://blogs.adobe.com/vikaschandran/2012/02/07/enabling-flash-player-logs-flex-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Issue :</h2>
<p>Enabling Flash Player logs Flex Applications [Windows 7, 2008, Vista]</p>
<h2>Solution :</h2>
<p dir="ltr" align="left">To enable flash logs,</p>
<p dir="ltr" align="left">All you need to do is to create file called &#8220;mm.cfg&#8221; at the location</p>
<p dir="ltr" align="left">For eg : C:\Users\&lt; your windows username&gt;</p>
<p dir="ltr" align="left">A complete list of the locations for different OS can be found at refer :</p>
<p dir="ltr" align="left"><a href="http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html"><span style="font-family: Calibri,Century Gothic; font-size: small;"><span style="font-family: Calibri,Century Gothic; font-size: small;">http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html</span></span></a></p>
<p dir="ltr" align="left"> [note : Ensure you have Debug version of Flash player, you can check that by using the Flash player Version test link :</p>
<p dir="ltr" align="left"><a href="http://kb2.adobe.com/cps/155/tn_15507.html"><span style="font-family: Calibri,Century Gothic; font-size: small;"><span style="font-family: Calibri,Century Gothic; font-size: small;">http://kb2.adobe.com/cps/155/tn_15507.html</span></span></a> <span style="font-family: Calibri,Century Gothic; font-size: small;">]</span></p>
<p dir="ltr" align="left"><a class="lightbox" title="Flash Player Check" href="http://blogs.adobe.com/vikaschandran/files/2012/02/Flash-Player-Check1.jpg"><img class="alignnone size-full wp-image-651" title="Flash Player Check" src="http://blogs.adobe.com/vikaschandran/files/2012/02/Flash-Player-Check1.jpg" alt="" width="205" height="109" /></a></p>
<p dir="ltr" align="left">Modify the &#8220;mm.cfg&#8221; file to include the following</p>
<pre dir="ltr"></pre>
<pre>ErrorReportingEnable=1</pre>
<pre>TraceOutputFileEnable=1</pre>
<p dir="ltr" align="left">Now run the Flex/Air application on the same machine on which you have made the changes to &#8220;mm.cfg&#8221; file</p>
<p dir="ltr" align="left">You would find the errors in the log created at</p>
<p dir="ltr" align="left">C:\Users\&lt;username&gt;\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txt</p>
<p dir="ltr" align="left">A complete list of the locations for different OS can be found at refer :</p>
<p dir="ltr" align="left"><a href="http://help.adobe.com/en_US/flex/using/WSda78ed3a750d6b8f-4867184d1239f9d0558-8000.html"><span style="font-family: Calibri,Century Gothic; font-size: small;"><span style="font-family: Calibri,Century Gothic; font-size: small;">http://help.adobe.com/en_US/flex/using/WSda78ed3a750d6b8f-4867184d1239f9d0558-8000.html</span></span></a></p>
<h2 dir="ltr" align="left">Additional Information</h2>
<p><strong>Client-Side Logging</strong></p>
<p><a title="Client-Side Logging" href="http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f6f9ad-7fffUpdate.html" target="_blank">http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f6f9ad-7fffUpdate.html</a></p>
<p><strong>Server-Side Logging</strong></p>
<p><a title="Server-Side Logging" href="http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f7045b-7f42Update.html" target="_blank">http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f7045b-7f42Update.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2012/02/07/enabling-flash-player-logs-flex-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exporting Flex chart Component to Excel as image</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/11/18/exporting-flex-chart-component-to-excel-as-image/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/11/18/exporting-flex-chart-component-to-excel-as-image/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 09:44:47 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX-COLDFUSION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=619</guid>
		<description><![CDATA[Issue Exporting Flex chart Component to Excel as image Solution :          Create a chart component &#160; Use the method ImageSnapshot .captureImage() to capture snapshot of any component. please refer : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/ImageSnapshot.html#captureImage%28%29 as in the code, var ImageBA:ByteArray = ImageSnapshot.captureImage( &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/11/18/exporting-flex-chart-component-to-excel-as-image/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Issue</h2>
<p>Exporting Flex chart Component to Excel as image</p>
<h2>Solution :</h2>
<p><a class="lightbox" title="Flex Application for Chart Export to Excel" href="http://blogs.adobe.com/vikaschandran/files/2011/11/Flex-Application-for-Chart-Export-to-Excel.png"><img class="alignnone size-medium wp-image-625" title="Flex Application for Chart Export to Excel" src="http://blogs.adobe.com/vikaschandran/files/2011/11/Flex-Application-for-Chart-Export-to-Excel-300x187.png" alt="" width="300" height="187" /></a>         <a class="lightbox" title="Generated Excel Sheet" href="http://blogs.adobe.com/vikaschandran/files/2011/11/Generated-Excel-Sheet.png"><img class="alignnone size-medium wp-image-626" title="Generated Excel Sheet" src="http://blogs.adobe.com/vikaschandran/files/2011/11/Generated-Excel-Sheet-300x188.png" alt="" width="300" height="188" /></a><br />
<strong></strong></p>
<ul>
<li><strong>Create a chart component</strong></li>
</ul>
<p>&nbsp;</p>
<ul>
<li><strong>Use the method ImageSnapshot .captureImage() to capture snapshot of any component</strong>.</li>
</ul>
<p>please refer : <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/ImageSnapshot.html#captureImage%28%29">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/ImageSnapshot.html#captureImage%28%29</a> as in the code, var ImageBA:ByteArray = ImageSnapshot.captureImage( Chart, 0, new JPEGEncoder() ).data;</p>
<pre><strong>Store the same on a byte array and forward the same to a ColdFusion component as an argument.</strong>
 Remote Object call would look like :</pre>
<pre>        &lt;s:RemoteObject id="RemoteCall" endpoint="http://localhost:8300/flex2gateway/"
                        destination="ColdFusion" source="ChartToShuyi182703455.CallCFCTest"&gt;
            &lt;s:method name="CreateImage"
                      result="onResult(event)"
                      fault="onFault(event)"&gt;
            &lt;/s:method&gt;
        &lt;/s:RemoteObject&gt;

            protected function CreateImage_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                var ImageBA:ByteArray = ImageSnapshot.captureImage( Chart, 0, new JPEGEncoder() ).data;
                RemoteCall.CreateImage(ImageBA);
            }
&lt;s:Button id="CreateImage" label="CreateImage" click="CreateImage_clickHandler(event)" visible="{SnapshotImage.source != null}"/&gt;</pre>
<p>On the ColdFusion Server end</p>
<ul>
<li><strong>Use the binary data from the argument and use CFFile Tag to write the image to a file.</strong></li>
</ul>
<pre>    &lt;cffunction name="CreateImage"
        access="remote"
        output="false" returntype="String" &gt;

        &lt;cfargument name="ImageBA" type="binary" required="true" /&gt;
        &lt;cffile action="write" file="#theDir#test.jpg" output="#arguments.ImageBA#" &gt;
        &lt;cfreturn "The Image can be found on server : "&amp;#theDir#&gt;
    &lt;/cffunction&gt;</pre>
<ul>
<li><strong> Write the image file to the Excel Spreadsheet using CFspreadsheet</strong></li>
</ul>
<p>please refer : <a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS434C35B0-279B-4051-A61B-D84B5D76189C.html">http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS434C35B0-279B-4051-A61B-D84B5D76189C.html</a><br />
and SpreadsheetAddImage please refer : <a href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-688c.html">http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-688c.html</a></p>
<pre>    &lt;cffunction name="ExportToExcel"
        access="remote"
                output="false" returntype="String" &gt;
        &lt;cfimage name="ComponentImage" source="#theDir#test.jpg" action="read"  /&gt;
        &lt;cfscript&gt;
            SpreadSheetObj=spreadsheetNew();
            spreadsheetAddimage(spreadsheetobj,ComponentImage,"jpg","5,5,25,12");
        &lt;/cfscript&gt;
        &lt;cfspreadsheet action="write"
                       name="SpreadSheetObj"
                       filename="#theDir#imagesheet.xls" overwrite="true" &gt;
        &lt;cfreturn "The SpreadSheet with Chart Image can be found on server : "&amp;#theDir#&gt;
    &lt;/cffunction&gt;</pre>
<h2>Additional Information :</h2>
<p>Adobe Products used SDK 4.5.1 and ColdFusion 9.0</p>
<p>&nbsp;</p>
<h2>Flex Code [ChartToExcelAsImage.mxml]:</h2>
<p>&nbsp;</p>
<pre> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"  
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"&gt;

    &lt;fx:Declarations&gt;
        &lt;s:RemoteObject id="RemoteCall" endpoint="http://localhost:8300/flex2gateway/"
                        destination="ColdFusion" source="ChartToShuyi182703455.CallCFCTest"&gt;
            &lt;s:method name="CreateImage"
                      result="onResult(event)"
                      fault="onFault(event)"&gt;
            &lt;/s:method&gt;
            &lt;s:method name="ExportToExcel"
                      result="onResult(event)"
                      fault="onFault(event)"&gt;
            &lt;/s:method&gt;
            &lt;s:method name="ClearFiles"
                      result="onResult(event)"
                      fault="onFault(event)"&gt;
            &lt;/s:method&gt;
        &lt;/s:RemoteObject&gt;
    &lt;/fx:Declarations&gt;
    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.graphics.ImageSnapshot;
            import mx.graphics.codec.JPEGEncoder;
            import mx.rpc.events.FaultEvent;
            import mx.rpc.events.ResultEvent;

            private var SnapShot:ImageSnapshot;
            [Bindable]private var medalsAC:ArrayCollection = new ArrayCollection( [
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
            private var snapshot :ImageSnapshot;
            protected function ScreenShot_clickHandler(event:MouseEvent):void
            {
                SnapshotImage.source=ImageSnapshot.captureImage( Chart, 0, new JPEGEncoder() ).data;
                SnapshotImage.width=ChartComponent.width;
                SnapshotImage.height=ChartComponent.height;
                CreateImage.enabled=true;
            }
            public function onResult(event : ResultEvent) : void
            {
                ServerReturn.text=event.result as String;
            }
            public function onFault(event : FaultEvent) : void
            {
                Alert.show(event.fault.message,event.fault.faultCode );
            }

            protected function CreateImage_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                var ImageBA:ByteArray = ImageSnapshot.captureImage( Chart, 0, new JPEGEncoder() ).data;
                RemoteCall.CreateImage(ImageBA);
                CreateImage.enabled=false;
                ExportToExcel.enabled=true;
                ClearFiles.enabled=false;
            }

            protected function ExportToExcel_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                RemoteCall.ExportToExcel.send();
                CreateImage.enabled=false;
                ExportToExcel.enabled=false;
                ClearFiles.enabled=true;
            }

            protected function ClearFiles_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                RemoteCall.ClearFiles.send();
                CreateImage.enabled=false;
                ExportToExcel.enabled=false;
                ClearFiles.enabled=false;
            }

        ]]&gt;
    &lt;/fx:Script&gt;

    &lt;s:layout&gt;
        &lt;s:VerticalLayout verticalAlign="middle" horizontalAlign="center" /&gt;
    &lt;/s:layout&gt;

    &lt;s:Panel title="BarChart Control"
             color="0x000000"
             borderAlpha="0.15" width="100%"&gt;

        &lt;s:layout&gt;
            &lt;s:HorizontalLayout /&gt;
        &lt;/s:layout&gt;
        &lt;mx:HDividedBox width="100%"&gt;

            &lt;s:Panel id="ChartComponent" title="Chart Component" &gt;
                &lt;s:layout&gt;
                    &lt;s:HorizontalLayout/&gt;
                &lt;/s:layout&gt;
                &lt;mx:HBox id="Chart" backgroundColor="white"&gt;
                    &lt;mx:BarChart id="bar" height="100%" color="0x323232"
                                 showDataTips="true" dataProvider="{medalsAC}"&gt;

                        &lt;mx:verticalAxis&gt;
                            &lt;mx:CategoryAxis categoryField="Country"/&gt;
                        &lt;/mx:verticalAxis&gt;

                        &lt;mx:series&gt;
                            &lt;mx:BarSeries yField="Country" xField="Gold" displayName="Gold"/&gt;
                            &lt;mx:BarSeries yField="Country" xField="Silver" displayName="Silver"/&gt;
                            &lt;mx:BarSeries yField="Country" xField="Bronze" displayName="Bronze"/&gt;
                        &lt;/mx:series&gt;
                    &lt;/mx:BarChart&gt;

                    &lt;mx:Legend dataProvider="{bar}" color="0x323232"/&gt;
                &lt;/mx:HBox&gt;
            &lt;/s:Panel&gt;
            &lt;s:Panel title="Screen Shot"&gt;
                &lt;s:Image id="SnapshotImage" width="{ChartComponent.width}" height="{ChartComponent.height}"/&gt;
            &lt;/s:Panel&gt;        
        &lt;/mx:HDividedBox&gt;

    &lt;/s:Panel&gt;
    &lt;s:Panel minWidth="600" minHeight="150"&gt;
        &lt;s:layout&gt;
            &lt;s:VerticalLayout verticalAlign="middle" horizontalAlign="center"/&gt;
        &lt;/s:layout&gt;
        &lt;s:Button id="ScreenShot" label="Take ScreenShot" click="ScreenShot_clickHandler(event)"/&gt;
        &lt;mx:Text id="ServerReturn" text="no data from server"/&gt;
        &lt;s:Button id="CreateImage" label="CreateImage" click="CreateImage_clickHandler(event)" visible="{SnapshotImage.source != null}"/&gt;
        &lt;s:Button id="ExportToExcel" label="ExportToExcel" click="ExportToExcel_clickHandler(event)" enabled="false" /&gt;
        &lt;s:Button id="ClearFiles" label="ExportToExcel" click="ClearFiles_clickHandler(event)" enabled="false" /&gt;
    &lt;/s:Panel&gt;
&lt;/s:Application&gt;

</pre>
<h2>ColdFusion Code :[CallCFCTest.cfc]</h2>
<p>&nbsp;</p>
<pre>&lt;cfcomponent displayname="CallCFCTest"&gt;
        &lt;cfscript&gt;
            theDir=getDirectoryFromPath(GetCurrentTemplatePath());
        &lt;/cfscript&gt;
    &lt;cffunction name="CreateImage"
        access="remote"
        output="false" returntype="String" &gt;

        &lt;cfargument name="ImageBA" type="binary" required="true" /&gt;
        &lt;cffile action="write" file="#theDir#test.jpg" output="#arguments.ImageBA#" &gt;
        &lt;cfreturn "The Image can be found on server : "&amp;#theDir#&gt;
    &lt;/cffunction&gt;

    &lt;cffunction name="ExportToExcel"
        access="remote"
                output="false" returntype="String" &gt;
        &lt;cfimage name="ComponentImage" source="#theDir#test.jpg" action="read"  /&gt;
        &lt;cfscript&gt;
            SpreadSheetObj=spreadsheetNew();
            spreadsheetAddimage(spreadsheetobj,ComponentImage,"jpg","5,5,25,12");
        &lt;/cfscript&gt;
        &lt;cfspreadsheet action="write"
                       name="SpreadSheetObj"
                       filename="#theDir#imagesheet.xls" overwrite="true" &gt;
        &lt;cfreturn "The SpreadSheet with Chart Image can be found on server : "&amp;#theDir#&gt;
    &lt;/cffunction&gt;
    &lt;cffunction name="ClearFiles"
        access="remote"
                output="false" returntype="String" &gt;

        &lt;cffile action="delete" file="#theDir#test.jpg"&gt;
        &lt;cffile action="delete" file="#theDir#imagesheet.xls"&gt;
        &lt;cfreturn "The SpreadSheet along with Chart Image have been deleted from Server: "&amp;#theDir#&gt;
    &lt;/cffunction&gt;
&lt;/cfcomponent&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/11/18/exporting-flex-chart-component-to-excel-as-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How make MX DataGrid Cell components i.e. ItemRenderers Automation Friendly</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/10/28/how-make-mx-datagrid-cell-components-i-e-itemrenderers-automation-friendly/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/10/28/how-make-mx-datagrid-cell-components-i-e-itemrenderers-automation-friendly/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 21:45:45 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX AUTOMATION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=548</guid>
		<description><![CDATA[Issue : How make MX DataGrid Cell components i.e. Custom ItemRenderers Automation Friendly Solution : Developers tend to modify the components that usually make up the default cell [ ItemRenderer=cell ] of a Data Grid, to fullfill there business requirements. &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/10/28/how-make-mx-datagrid-cell-components-i-e-itemrenderers-automation-friendly/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Issue :</h2>
<p>How make MX DataGrid Cell components i.e. Custom ItemRenderers Automation Friendly</p>
<h2>Solution :</h2>
<p>Developers tend to modify the components that usually make up the default cell [ ItemRenderer=cell ] of a Data Grid, to fullfill there business requirements.<br />
A Default cell of a DataGrid is made up of a &#8216;UITextField&#8217; which is nothing but Text and no other component associated with it and shows up as &#8216;FlexListLabel&#8217; when recognized with QTP,</p>
<p><a class="lightbox" title="FlexListLabel" href="http://blogs.adobe.com/vikaschandran/files/2011/10/FlexListLabel.png"><img class="alignnone size-medium wp-image-549" title="FlexListLabel" src="http://blogs.adobe.com/vikaschandran/files/2011/10/FlexListLabel-300x187.png" alt="" width="300" height="187" /></a><br />
modifications may include adding buttons, link buttons, more text, Text Area etc<br />
but if you don&#8217;t add them correctly, the components under the Data Grid which are inside the custom item renderer would not be exposed to Automation.</p>
<p>One of the ways to ensure that all components inside your DataGrid cell remain exposed to automation is as follows,</p>
<p>Please find the sample application below “DataGridLinkedButton.mxml”</p>
<p>Your developers need to define inline or External Item renderers for your Data Grid,</p>
<p>based on a Flex container [in the example we have used “HBox”] which exposes its children automatically to automation [you can use HBox or VBox ].</p>
<p>&nbsp;</p>
<p><strong>For Inline Item renderer :</strong></p>
<pre>&lt;mx:DataGridColumn headerText="Inline Renderer" width="150"&gt;</pre>
<pre>&lt;mx:itemRenderer&gt;</pre>
<pre>&lt;fx:Component&gt;</pre>
<pre>&lt;mx:HBox horizontalAlign="center"&gt;</pre>
<pre>&lt;mx:LinkButton label="TestLinkButton" color="haloblue" rollOverColor="haloSilver"/&gt;</pre>
<pre>&lt;/mx:HBox&gt;</pre>
<pre>&lt;/fx:Component&gt;</pre>
<pre>&lt;/mx:itemRenderer&gt;</pre>
<pre>&lt;/mx:DataGridColumn&gt;</pre>
<p>&nbsp;</p>
<p><strong>For External Item Renderer [ </strong>refer : “myExternalItemRenderer.mxml “<strong>]</strong></p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;</pre>
<pre>&lt;mx:HBox xmlns:fx="<a href="http://ns.adobe.com/mxml/2009">http://ns.adobe.com/mxml/2009</a>"</pre>
<pre>xmlns:s="library://ns.adobe.com/flex/spark"</pre>
<pre>xmlns:mx="library://ns.adobe.com/flex/mx"</pre>
<pre>focusEnabled="true" horizontalAlign="center"&gt;</pre>
<pre>&lt;mx:LinkButton label="LinkButton from External Renderer" color="haloblue" rollOverColor="haloSilver"/&gt;</pre>
<pre>&lt;/mx:HBox&gt;</pre>
<p>&nbsp;</p>
<p><strong>Please refer the Image :</strong></p>
<p><a class="lightbox" title="DataGridWithLinkButtonAutomationReady" href="http://blogs.adobe.com/vikaschandran/files/2011/10/DataGridWithLinkButtonAutomationReady.png"><img class="alignnone size-medium wp-image-550" title="DataGridWithLinkButtonAutomationReady" src="http://blogs.adobe.com/vikaschandran/files/2011/10/DataGridWithLinkButtonAutomationReady-300x187.png" alt="" width="300" height="187" /></a></p>
<p><strong>Click operations on </strong></p>
<p><strong>1<sup>st </sup>,2<sup>nd</sup> ,3<sup>rd</sup> ,</strong></p>
<p><strong>4<sup>th</sup> column [</strong>contains External Item Renderer with LinkButton<strong>]</strong></p>
<p><strong>and 5<sup>th</sup> column [</strong>contains Inline Item Renderer with LinkButton<strong>]</strong></p>
<p>Would record Automation scripts like so.</p>
<p>&nbsp;</p>
<p><strong>Automation Scripts :</strong></p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;DataGridLinkedButtonQualcomm18&#8243;).SparkPanel(&#8220;DataGrid Control&#8221;).FlexDataGrid(&#8220;dg&#8221;).Select &#8220;*Christina Coenraets* | 555-219-2270 | <a href="mailto:ccoenraets@fictitious.com">ccoenraets@fictitious.com</a> | LinkButton from External Renderer | TestLinkButton&#8221;</p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;DataGridLinkedButtonQualcomm18&#8243;).SparkPanel(&#8220;DataGrid Control&#8221;).FlexDataGrid(&#8220;dg&#8221;).Select &#8220;Christina Coenraets | *555-219-2270* | <a href="mailto:ccoenraets@fictitious.com">ccoenraets@fictitious.com</a> | LinkButton from External Renderer | TestLinkButton&#8221;</p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;DataGridLinkedButtonQualcomm18&#8243;).SparkPanel(&#8220;DataGrid Control&#8221;).FlexDataGrid(&#8220;dg&#8221;).Select &#8220;Christina Coenraets | 555-219-2270 | <a href="mailto:*ccoenraets@fictitious.com*">*ccoenraets@fictitious.com*</a> | LinkButton from External Renderer | TestLinkButton&#8221;</p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;DataGridLinkedButtonQualcomm18&#8243;).SparkPanel(&#8220;DataGrid Control&#8221;).FlexDataGrid(&#8220;dg&#8221;).FlexButton(&#8220;LinkButton from External&#8221;).Click</p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;DataGridLinkedButtonQualcomm18&#8243;).SparkPanel(&#8220;DataGrid Control&#8221;).FlexDataGrid(&#8220;dg&#8221;).FlexButton(&#8220;TestLinkButton&#8221;).Click</p>
<h2>Additional Information :</h2>
<p><a href="http://blogs.adobe.com/vikaschandran/2010/10/01/input-operation-on-flexadvanceddatagrid-cell-using-qtp/" target="_blank">Input Operation on FlexAdvancedDataGrid Cell using QTP</a></p>
<p>&nbsp;</p>
<p><strong>FLEX CODE</strong></p>
<p><strong>DataGridLinkedButton.mxml</strong></p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"&gt;

        &lt;fx:Declarations&gt;
            &lt;fx:XMLList id="employees"&gt;
                &lt;employee&gt;
                    &lt;name&gt;Christina Coenraets&lt;/name&gt;
                    &lt;phone&gt;555-219-2270&lt;/phone&gt;
                    &lt;email&gt;ccoenraets@fictitious.com&lt;/email&gt;
                    &lt;active&gt;true&lt;/active&gt;
                    &lt;image&gt;images/arrow_icon_sm.png&lt;/image&gt;
                &lt;/employee&gt;
                &lt;employee&gt;
                    &lt;name&gt;Joanne Wall&lt;/name&gt;
                    &lt;phone&gt;555-219-2012&lt;/phone&gt;
                    &lt;email&gt;jwall@fictitious.com&lt;/email&gt;
                    &lt;active&gt;true&lt;/active&gt;
                &lt;/employee&gt;
                &lt;employee&gt;
                    &lt;name&gt;Maurice Smith&lt;/name&gt;
                    &lt;phone&gt;555-219-2012&lt;/phone&gt;
                    &lt;email&gt;maurice@fictitious.com&lt;/email&gt;
                    &lt;active&gt;false&lt;/active&gt;
                &lt;/employee&gt;
                &lt;employee&gt;
                    &lt;name&gt;Mary Jones&lt;/name&gt;
                    &lt;phone&gt;555-219-2000&lt;/phone&gt;
                    &lt;email&gt;mjones@fictitious.com&lt;/email&gt;
                    &lt;active&gt;true&lt;/active&gt;
                &lt;/employee&gt;
            &lt;/fx:XMLList&gt;
        &lt;/fx:Declarations&gt;

        &lt;s:layout&gt;
            &lt;s:HorizontalLayout horizontalAlign="center" /&gt;
        &lt;/s:layout&gt;

        &lt;s:Panel title="DataGrid Control"
                 color="0x000000"
                 borderAlpha="0.15"&gt;

            &lt;s:layout&gt;
                &lt;s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/&gt;
            &lt;/s:layout&gt;

            &lt;s:Label width="100%" color="0x323232"
                     text="Select a row in the DataGrid control."/&gt;

            &lt;mx:DataGrid id="dg" color="0x323232" width="100%" rowCount="3" dataProvider="{employees}"&gt;
                &lt;mx:columns&gt;
                    &lt;mx:DataGridColumn dataField="name" headerText="Name"/&gt;
                    &lt;mx:DataGridColumn dataField="phone" headerText="Phone"/&gt;
                    &lt;mx:DataGridColumn dataField="email" headerText="Email"/&gt;
                    &lt;mx:DataGridColumn headerText="External Renderer" itemRenderer="myExternalItemRenderer" width="250"/&gt;
                    &lt;mx:DataGridColumn headerText="Inline Renderer" width="150"&gt;
                        &lt;mx:itemRenderer&gt;
                            &lt;fx:Component&gt;
                                &lt;mx:HBox horizontalAlign="center"&gt;
                                    &lt;mx:LinkButton label="TestLinkButton" color="haloblue" rollOverColor="haloSilver"/&gt;
                                &lt;/mx:HBox&gt;
                            &lt;/fx:Component&gt;
                        &lt;/mx:itemRenderer&gt;
                    &lt;/mx:DataGridColumn&gt;
                &lt;/mx:columns&gt;
            &lt;/mx:DataGrid&gt;

            &lt;mx:Form color="0x323232" width="100%" height="100%" paddingTop="0" paddingBottom="0"  &gt;

                &lt;mx:FormItem label="Name" paddingTop="0" paddingBottom="0"&gt;
                    &lt;s:Label text="{dg.selectedItem.name}"/&gt;
                &lt;/mx:FormItem&gt;
                &lt;mx:FormItem label="Email" paddingTop="0" paddingBottom="0"&gt;
                    &lt;s:Label text="{dg.selectedItem.email}"/&gt;
                &lt;/mx:FormItem&gt;
                &lt;mx:FormItem label="Phone" paddingTop="0" paddingBottom="0"&gt;
                    &lt;s:Label text="{dg.selectedItem.phone}"/&gt;
                &lt;/mx:FormItem&gt;

            &lt;/mx:Form&gt;

        &lt;/s:Panel&gt;

&lt;/s:Application&gt;</pre>
<p>&nbsp;</p>
<p><strong>myExternalItemRenderer.mxml</strong></p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
                          xmlns:s="library://ns.adobe.com/flex/spark"
                          xmlns:mx="library://ns.adobe.com/flex/mx"
                          focusEnabled="true" horizontalAlign="center"&gt;
    &lt;mx:LinkButton label="LinkButton from External Renderer" color="haloblue" rollOverColor="haloSilver"/&gt;
&lt;/mx:HBox&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/10/28/how-make-mx-datagrid-cell-components-i-e-itemrenderers-automation-friendly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex applications show up as Macromedia Flash objects on QTP Object Spy</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/09/15/flex-applications-show-up-as-macromedia-flash-objects-on-qtp-object-spy/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/09/15/flex-applications-show-up-as-macromedia-flash-objects-on-qtp-object-spy/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 12:34:04 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX AUTOMATION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=498</guid>
		<description><![CDATA[Issue : Flex applications show up as Macromedia Flash objects on QTP Object Spy Potential Causes : Ensure the your environment works on Automation enabled build from Adobe, Please refer : http://www.adobe.com/devnet/flex/samples/flex_store_v2.html If the app does not work,the possible causes &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/09/15/flex-applications-show-up-as-macromedia-flash-objects-on-qtp-object-spy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Issue :</h2>
<p>Flex applications show up as Macromedia Flash objects on QTP Object Spy</p>
<p><a class="lightbox" title="Flash Object" href="http://blogs.adobe.com/vikaschandran/files/2011/09/Flash-Object2.jpg"><img class="alignnone size-medium wp-image-501" title="Flash Object" src="http://blogs.adobe.com/vikaschandran/files/2011/09/Flash-Object2-233x300.jpg" alt="" width="233" height="300" /></a></p>
<h2>Potential Causes :</h2>
<p>Ensure the your environment works on Automation enabled build from Adobe, Please refer : <a href="http://www.adobe.com/devnet/flex/samples/flex_store_v2.html">http://www.adobe.com/devnet/flex/samples/flex_store_v2.html</a></p>
<ul>
<li>If the app does not work,the possible causes are</li>
</ul>
<p>-Issues with compatibility of QTP-Browser-Flex Plugin/Addin<br />
-The Communication between ActiveX Plugin in the browser for Flex-QTP Automaiton Plugin and QTP is interrupted due to Browser Security settings.</p>
<ul>
<li>If the app works then the issue in your environment but your application, the possible causes are</li>
</ul>
<p>-Application is not compiled with automation swc files i.e. Flex Automation libraries.</p>
<h2><strong>Solution :</strong></h2>
<p><strong>Issues with compatibility of QTP-Browser-Flex Plugin/Addin</strong></p>
<p>Please refer : <a href="http://blogs.adobe.com/vikaschandran/2010/07/10/compatibility-matrix-for-flex-qtp-plugin-3-0-0-and-4-0-0-for-qtp-and-ie-combinations/">http://blogs.adobe.com/vikaschandran/2010/07/10/compatibility-matrix-for-flex-qtp-plugin-3-0-0-and-4-0-0-for-qtp-and-ie-combinations/</a></p>
<p>&nbsp;</p>
<p><strong>Application is compiled with automation swc files i.e. Flex Automation libraries.</strong></p>
<p>Please refer :</p>
<p>Compiling Flex 3 Applications to enable automation</p>
<p><a href="http://blogs.adobe.com/vikaschandran/2010/07/11/compiling-flex-3-applications-to-enable-automaiton/">http://blogs.adobe.com/vikaschandran/2010/07/11/compiling-flex-3-applications-to-enable-automaiton/</a></p>
<p>Compiling Flex 4 Applications to enable automation</p>
<p><a href="http://blogs.adobe.com/vikaschandran/2010/07/15/compiling-flex-4-applications-to-enable-automaiton/">http://blogs.adobe.com/vikaschandran/2010/07/15/compiling-flex-4-applications-to-enable-automaiton/</a></p>
<p>&nbsp;</p>
<p><strong>The Communication between ActiveX Plugin in the browser for Flex-QTP Automation Plugin and QTP is interrupted due to Browser Security settings</strong></p>
<p>This can be avoided by ensuring the following</p>
<p>-the TEAPluginIE.dll which is used by IE ActiveX for the Flex-QTP plug-in loads in Internet explorer when QTP is recording</p>
<p>Because if it’s not loaded in IE nothing would work, Process Explorer should help you check the same.</p>
<p>-the behavior of the Object Spy changes [win objects start showing up] if you change i.e. increase the security properties on the browser for internet and intranet</p>
<p>-if you keep both internet and intranet security to medium or low</p>
<p>i.e. basically allowing the Flex-QTP ActiveX component to do its job without hindrance. Everything would work fine.</p>
<p><script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/09/15/flex-applications-show-up-as-macromedia-flash-objects-on-qtp-object-spy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging checking and tracking variables in QTP with Flex-QTP Addin</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/09/15/debugging-checking-and-tracking-variables-in-qtp-with-flex-qtp-addin/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/09/15/debugging-checking-and-tracking-variables-in-qtp-with-flex-qtp-addin/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 10:44:55 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX AUTOMATION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=484</guid>
		<description><![CDATA[ISSUE Debugging and tracking variables in QTP SOLUTION Have a look at QTP  break point options in the image below the red dots you see in QTP in the image below are the Break points   -right click on the &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/09/15/debugging-checking-and-tracking-variables-in-qtp-with-flex-qtp-addin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Debugging and tracking variables in QTP</p>
<h2>SOLUTION</h2>
<p>Have a look at QTP  break point options in the image below</p>
<p><a class="lightbox" title="Break Point Options" href="http://blogs.adobe.com/vikaschandran/files/2011/09/1.jpg"><img class="alignnone size-medium wp-image-485" title="Break Point Options" src="http://blogs.adobe.com/vikaschandran/files/2011/09/1-202x300.jpg" alt="" width="202" height="300" /></a></p>
<p><strong>the red dots you see in QTP in the image below are the Break points</strong></p>
<p><strong> </strong></p>
<p>-right click on the Breakpoint to see the options,</p>
<p>-Use “Run from Step” and “Run to step”</p>
<p>&nbsp;</p>
<p>Or Use “Debug from Step”</p>
<p><a class="lightbox" title="Debug Viewer" href="http://blogs.adobe.com/vikaschandran/files/2011/09/3.jpg"><img class="alignnone size-medium wp-image-486" title="Debug Viewer" src="http://blogs.adobe.com/vikaschandran/files/2011/09/3-300x107.jpg" alt="" width="300" height="107" /></a></p>
<p>To add the variables to debug viewer you need to add watch on them use “Add to watch”</p>
<p>and check the &#8220;Debug viewer&#8221; panel to have look at the variables,</p>
<p>&nbsp;</p>
<p>And once the playback starts use<strong> “F10” and “F11” to step through the Automation Scripts line by line</strong></p>
<p>keep an eye on the &#8220;<strong>Object Repository</strong>&#8221;</p>
<p><a class="lightbox" title="Object Repository" href="http://blogs.adobe.com/vikaschandran/files/2011/09/2.jpg"><img class="alignnone size-medium wp-image-487" title="Object Repository" src="http://blogs.adobe.com/vikaschandran/files/2011/09/2-300x181.jpg" alt="" width="300" height="181" /></a></p>
<p>To check on the values,</p>
<p>You may also use the following code</p>
<p>myvariable=Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;ADGFidelity182547968Nikhil&#8221;).SparkPanel(&#8220;AdvancedDataGrid Control&#8221;).FlexAdvancedDataGrid(&#8220;myADG&#8221;).GetROProperty(&#8220;automationname&#8221;)</p>
<p>print myvariable               <strong>//myADG that you see on the image below is the print output</strong></p>
<p>myvariable2=Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;ADGFidelity182547968Nikhil&#8221;).SparkPanel(&#8220;AdvancedDataGrid Control&#8221;).FlexAdvancedDataGrid(&#8220;myADG&#8221;).GetROProperty(&#8220;automationindex&#8221;)</p>
<p>msgbox  myvariable2     <strong>//index:0 is the msgbox output</strong></p>
<p><a class="lightbox" title="4" href="http://blogs.adobe.com/vikaschandran/files/2011/09/4.jpg"><img class="alignnone size-medium wp-image-488" title="4" src="http://blogs.adobe.com/vikaschandran/files/2011/09/4-300x130.jpg" alt="" width="300" height="130" /></a><br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/09/15/debugging-checking-and-tracking-variables-in-qtp-with-flex-qtp-addin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red X instead of image in distributed environment ColdFusion 8 or 9 and IIS : Coldfusion does not serve the Static content by default</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/09/01/red-x-instead-of-image-in-distributed-environment-coldfusion-8-or-9-and-iis-coldfusion-does-not-serve-the-static-content-by-default/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/09/01/red-x-instead-of-image-in-distributed-environment-coldfusion-8-or-9-and-iis-coldfusion-does-not-serve-the-static-content-by-default/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 23:11:44 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[COLDFUSION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=474</guid>
		<description><![CDATA[ISSUE Red X instead of image in distributed environment ColdFusion 8 or 9 i.e. when IIS and ColdFusion are on 2 separate physical servers and files [Static content or Dynamic content] does not reside on Web Server but resides on &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/09/01/red-x-instead-of-image-in-distributed-environment-coldfusion-8-or-9-and-iis-coldfusion-does-not-serve-the-static-content-by-default/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Red X instead of image in distributed environment ColdFusion 8 or 9</p>
<p>i.e. when IIS and ColdFusion are on 2 separate physical servers and files [Static content or Dynamic content] does not reside on Web Server but resides on Application server i.e. server machine which has ColdFusion.</p>
<h2>SOLUTION [One of the possible solutions]</h2>
<p>Basically when it comes to Static content like images,<br />
ColdFusion does not serve the Static content by default</p>
<p>It looks to IIS to serve static content [due to the mapping that are set while configuring the web connector only CFM, CFC, CFR, CFML i.e. ColdFusion specific content would be processed by ColdFusion]</p>
<p>So when you place a request for any content,</p>
<p>by default the request goes to IIS first it checks the extension of the file requested,</p>
<p>if the extension matches the ones which correspond to ColdFusion extensions,</p>
<p>The request is forwarded to ColdFusion to be processed.</p>
<p>&nbsp;</p>
<p>If not it goes to IIS for processing.</p>
<p>&nbsp;</p>
<p>Since in certain environments its not possible to keep the files in IIS webroot</p>
<p>And all files are required to be kept at the Application Server Tier/Level.</p>
<p>&nbsp;</p>
<p>All we need to resolve this issue is to setup the application to use a context root.</p>
<p>So modify the</p>
<p>“Application.xml”</p>
<p>file under location “C:\JRun4\servers\&lt;server instance&gt;\cfusion-ear\META-INF”</p>
<p>&nbsp;</p>
<p>&lt;web&gt;</p>
<p>&lt;web-uri&gt;cfusion-war&lt;/web-uri&gt;</p>
<p>&lt;context-root&gt;/&lt;/context-root&gt;</p>
<p>&lt;/web&gt;</p>
<p>&nbsp;</p>
<p>To use an appropriate Context root.</p>
<p>Say</p>
<p>&lt;web&gt;</p>
<p>&lt;web-uri&gt;cfusion-war&lt;/web-uri&gt;</p>
<p>&lt;context-root&gt;/Aline&lt;/context-root&gt;</p>
<p>&lt;/web&gt;</p>
<p>This would force the Application to serve the static content from the Application Server end.</p>
<p>And the control would not go to IIS to serve the static content.<br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/09/01/red-x-instead-of-image-in-distributed-environment-coldfusion-8-or-9-and-iis-coldfusion-does-not-serve-the-static-content-by-default/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Port number required While configuring the web connector in distributed environment between IIS and Coldfusion 8 or 9</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/09/01/port-number-required/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/09/01/port-number-required/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 22:37:33 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[COLDFUSION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=467</guid>
		<description><![CDATA[ISSUE Port number required While configuring the web connector in distributed environment between IIS and Coldfusion 8 or 9 SOLUTION While configuring the connector using the &#8220;Wsconfig&#8221; tool in distributed environment between IIS and Coldfusion we need access to 3 &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/09/01/port-number-required/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Port number required While configuring the web connector in distributed environment between IIS and Coldfusion 8 or 9</p>
<h2>SOLUTION</h2>
<p>While configuring the connector using the &#8220;Wsconfig&#8221; tool in distributed environment between IIS and Coldfusion we need access to 3 port numbers</p>
<p><strong>The Remote port : </strong></p>
<p>At “C:\Jrun4\servers\&lt;serverInstance&gt;\SERVER-INF\jndi.properties”</p>
<p>At line</p>
<p>java.naming.provider.url=localhost:2904</p>
<p>Here 2904 is the remote port.</p>
<p><strong>The Proxy port :</strong></p>
<p>At “C:\Jrun4\servers\&lt;serverInstance&gt;\SERVER-INF\jrun.xml”</p>
<p>&lt;service class=&#8221;jrun.servlet.jrpp.JRunProxyService&#8221; name=&#8221;ProxyService&#8221;&gt;</p>
<p>&lt;attribute name=&#8221;activeHandlerThreads&#8221;&gt;25&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;backlog&#8221;&gt;500&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;deactivated&#8221;&gt;true&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;interface&#8221;&gt;*&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;maxHandlerThreads&#8221;&gt;1000&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;minHandlerThreads&#8221;&gt;1&lt;/attribute&gt;</p>
<p>&lt;attribute name=&#8221;port&#8221;&gt;<strong>51020</strong>&lt;/attribute&gt;</p>
<p>&nbsp;</p>
<p>Here 51020 is the proxy port</p>
<p>&nbsp;</p>
<p>And the <strong>RMI port</strong> [there is no way to determine this port ]: so disable firewall while configuring the connector in distributed architecture,</p>
<p>once the connector is configured re-enable the firewall with exceptions for Proxy port [Mandatory]</p>
<h2>ADDITIONAL INFORMATION</h2>
<p>If this does not work the only way to configure a connector is</p>
<p><strong>Manual Configuration of Web Connector</strong></p>
<p>please refer : <a href="http://www.adobe.com/devnet/coldfusion/articles/iis-configuration.html" target="_blank">http://www.adobe.com/devnet/coldfusion/articles/iis-configuration.html</a><br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/09/01/port-number-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traversing Spark Dropdown list with large number of items Flex SDK 4.x using QTP</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/08/18/traversing-spark-dropdown-list-sdk-4-x/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/08/18/traversing-spark-dropdown-list-sdk-4-x/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 05:41:50 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX AUTOMATION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=456</guid>
		<description><![CDATA[ISSUE Traversing Spark Dropdown list with large number of items Flex SDK 4.x using QTP SOLUTION The solution consists of two parts PART 1 Change the Dropdown code [Application code] to include a property useVirtualLayout=&#8221;false&#8221; [for more details please refer &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/08/18/traversing-spark-dropdown-list-sdk-4-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Traversing Spark Dropdown list with large number of items Flex SDK 4.x using QTP</p>
<h2>SOLUTION</h2>
<p>The solution consists of two parts</p>
<p><a title="Spark DropDown list traversal" href="http://blogs.adobe.com/vikaschandran/files/2011/08/testImage.png"><img title="Spark DropDown list traversal" src="http://blogs.adobe.com/vikaschandran/files/2011/08/testImage-300x187.png" alt="" width="300" height="187" /></a></p>
<p><strong>PART 1</strong></p>
<p>Change the Dropdown code [Application code] to include a property</p>
<p><strong>useVirtualLayout=&#8221;false&#8221; </strong></p>
<p><strong>[</strong>for more details please refer : <a title="Using virtualization with list-based controls" href="http://help.adobe.com/en_US/flex/using/WSc2368ca491e3ff92-1483ec4a12136246e76-8000.html#WS685c4ccbb85d340c6617851e121d4b8abae-8000" target="_blank">Using virtualization with list-based controls</a><strong>]</strong></p>
<p><strong><br />
</strong>&lt;s:DropDownList id=&#8221;DropDownTest&#8221; dataProvider=&#8221;{arrElementsDdl}&#8221; <strong>useVirtualLayout=&#8221;false&#8221;</strong> selectedIndex=&#8221;0&#8243;/&gt;</p>
<p>as in the sample application provided Please refer code below : <strong>SparkDropDownFidelity182460106CODE</strong></p>
<p><strong>PART 2</strong></p>
<p>Consists of using the automation Scripts as described below,</p>
<p><strong>&#8216;Get the number of  children under the Drop Down</strong></p>
<p>Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).Open<br />
Num=Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).GetItemsCount<br />
Print &#8220;&#8216;GetItemsCount’ value for Spark Drop Down: &#8220;&amp;Num</p>
<p><strong>&#8216;Loop through the items inside Drop Down using SelectIndex</strong><br />
For i=0 to Num-1<br />
Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).SelectIndex i</p>
<p><strong>&#8216;Always open the list before checking for the items</strong><br />
Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).Open<br />
temp=Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).SparkListLabel(&#8220;automationindex:=index:&#8221;&amp;i).Exist<br />
print &#8220;Object Exists ? : &#8221; &amp;temp<br />
set SparkGetItem=Browser(&#8220;Browser&#8221;).SparkApplication(&#8220;SparkDropDownFidelity182460106&#8243;).SparkDropDownList(&#8220;DropDownTest&#8221;).SparkListLabel(&#8220;automationindex:=index:&#8221;&amp;i)</p>
<p><strong>&#8216;Access the properties of the item</strong><br />
ItemAutomationname=SparkGetItem.GetROProperty(&#8220;automationname&#8221;)<br />
ItemAutomationindex=SparkGetItem.GetROProperty(&#8220;automationindex&#8221;)<br />
print &#8220;Spark Automationname : &#8221; &amp; ItemAutomationname&amp;&#8221; Automationindex : &#8221; &amp;ItemAutomationindex<br />
Next</p>
<h2>ADDITIONAL INFORMATION</h2>
<p><strong>SparkDropDownFidelity182460106CODE</strong></p>
<p><strong></strong>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;s:Application xmlns:fx=&#8221;http://ns.adobe.com/mxml/2009&#8243;<br />
xmlns:s=&#8221;library://ns.adobe.com/flex/spark&#8221;<br />
xmlns:mx=&#8221;library://ns.adobe.com/flex/mx&#8221; minWidth=&#8221;955&#8243; minHeight=&#8221;600&#8243;&gt;</p>
<p>&lt;fx:Declarations&gt;<br />
&lt;!&#8211; Place non-visual elements (e.g., services, value objects) here &#8211;&gt;</p>
<p>&lt;/fx:Declarations&gt;<br />
&lt;fx:Script&gt;<br />
&lt;![CDATA[<br />
import mx.collections.ArrayCollection;</p>
<p>[Bindable]<br />
public var arrElementsDdl:ArrayCollection = new ArrayCollection([<br />
{label:"Item 1", data:1},<br />
{label:"Item 2", data:2},<br />
{label:"Item 3", data:3},<br />
{label:"Item 4", data:4},<br />
{label:"Item 5", data:5},<br />
{label:"Item 6", data:6},<br />
{label:"Item 7", data:7},<br />
{label:"Item 8", data:8},<br />
{label:"Item 9", data:9},<br />
{label:"Item 10", data:10},<br />
{label:"Item 11", data:11},<br />
{label:"Item 12", data:12},<br />
{label:"Item 13", data:13},<br />
{label:"Item 14", data:14},<br />
{label:"Item 15", data:15}]);<br />
]]&gt;<br />
&lt;/fx:Script&gt;<br />
&lt;s:layout&gt;<br />
&lt;s:VerticalLayout/&gt;<br />
&lt;/s:layout&gt;</p>
<p>&lt;s:ComboBox id=&#8221;cboxTest&#8221; dataProvider=&#8221;{arrElementsDdl}&#8221; selectedIndex=&#8221;0&#8243; /&gt;<br />
&lt;s:DropDownList id=&#8221;DropDownTest&#8221; dataProvider=&#8221;{arrElementsDdl}&#8221; useVirtualLayout=&#8221;false&#8221; selectedIndex=&#8221;0&#8243;/&gt;<br />
&lt;mx:Text id=&#8221;testText&#8221; text=&#8221;SDK 4.0 test 2 with useVirtualLayout=false&#8221;/&gt;<br />
&lt;/s:Application&gt;<br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/08/18/traversing-spark-dropdown-list-sdk-4-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running servlets on Coldfusion 9</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/07/15/running-servlets-on-coldfusion-9-2/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/07/15/running-servlets-on-coldfusion-9-2/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 14:23:26 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[COLDFUSION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=442</guid>
		<description><![CDATA[ISSUE Running servlets on Coldfusion 9 SOLUTION ColdFusion 9 is basically a J2EE Application running on an Application server known as JRUN since Application Server have a web Container by default they are capable of processing servlets so in short &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/07/15/running-servlets-on-coldfusion-9-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Running servlets on Coldfusion 9</p>
<h2><span id="more-442"></span>SOLUTION</h2>
<p>ColdFusion 9 is basically a J2EE Application running on an Application server known as JRUN</p>
<p>since Application Server have a web Container by default they are capable of processing servlets</p>
<p>so in short you can run Servlets on ColdFusion 9.</p>
<p>Official Documentation :</p>
<p><strong>Interoperating with JSP pages and servlets</strong></p>
<p><a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-786c.html#WSA0035455-0E0B-4866-8F04-E44A66B33A90" target="_blank">http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-786c.html#WSA0035455-0E0B-4866-8F04-E44A66B33A90</a></p>
<p><strong>About ColdFusion, Java, and J2EE</strong></p>
<p><a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec14231-7fe5.html#WSc3ff6d0ea77859461172e0811cbec14231-7fe1" target="_blank">http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec14231-7fe5.html#WSc3ff6d0ea77859461172e0811cbec14231-7fe1</a></p>
<h3>TO TEST</h3>
<p>-<strong>Create a cfm page and call the Servlet</strong> [in our case the servlet name is "testServlet"] with content.</p>
<p>note we are using &#8220;GetPageContext().forward(&#8220;testServlet&#8221;);&#8221;</p>
<p>to forward the request to the servlet.</p>
<p style="padding-left: 60px;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;This is a test CFM page calling a Servlet page&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;This is a test CFM page calling a Servlet page named &#8220;testServlet&#8221;&lt;/h1&gt;<br />
&lt;cfscript&gt;<br />
GetPageContext().forward(&#8220;testServlet&#8221;);<br />
&lt;/cfscript&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>-Create a Servlet name it &#8220;testServlet.java&#8221; with content <strong>testServlet</strong>[please refer the code mentioned at the end]</p>
<p>once you have compiled the Servlet.</p>
<p>-<strong>Copy the compiled Servlet &#8220;.Class&#8221; file to location</strong></p>
<p>For ColdFusion Standalone : C:\ColdFusion9\wwwroot\WEB-INF\classes</p>
<p>For ColdFusion Multiserver : C:\JRun4\servers\&lt;coldfusion instance name&gt;\cfusion-ear\cfusion-war\WEB-INF\classes</p>
<p><strong>-Add Servlet specific mapping entries to ColdFusion &#8220;web.xml&#8221;</strong></p>
<p>The &#8220;web.xml&#8221; can be found at location</p>
<p>For ColdFusion Standalone : C:\ColdFusion9\wwwroot\WEB-INF\</p>
<p>For ColdFusion Multiserver : C:\JRun4\servers\&lt;coldfusion instance name&gt;\cfusion-ear\cfusion-war\WEB-INF\</p>
<p>The entries should look like :</p>
<p>&lt;servlet&gt;<br />
&lt;description&gt;&lt;/description&gt;<br />
&lt;display-name&gt;testServlet&lt;/display-name&gt;<br />
&lt;servlet-name&gt;testServlet&lt;/servlet-name&gt;<br />
&lt;servlet-class&gt;testServlet&lt;/servlet-class&gt;<br />
&lt;/servlet&gt;</p>
<p>&lt;servlet-mapping&gt;<br />
&lt;servlet-name&gt;testServlet&lt;/servlet-name&gt;<br />
&lt;url-pattern&gt;/testServlet&lt;/url-pattern&gt;<br />
&lt;/servlet-mapping&gt;</p>
<p>&nbsp;</p>
<p>[ These entries to "web.xml" would not be required if you are using annotations</p>
<p>i.e. @WebServlet(name = "testServlet", urlPatterns = {"/testServlet"}</p>
<p>please note that these annotations only work on JDK versions which support the same so please be mindful regarding the same.</p>
<p>for the sake of this test i have commented out the annotations]</p>
<p>-Restart the ColdFusion server once all files and entries are in place request the CFM page.</p>
<p>you would see output as[instead of the HTML you specified in the CFM page]</p>
<p><a class="lightbox" title="testServletOutput" href="http://blogs.adobe.com/vikaschandran/files/2011/07/testServletOutput.png"><img class="alignnone size-medium wp-image-447" title="testServletOutput" src="http://blogs.adobe.com/vikaschandran/files/2011/07/testServletOutput-300x142.png" alt="" width="300" height="142" /></a></p>
<p><strong>testServlet CODE</strong></p>
<p>import java.io.IOException;<br />
import java.io.PrintWriter;<br />
import javax.servlet.ServletException;<br />
import javax.servlet.annotation.WebServlet;<br />
import javax.servlet.http.HttpServlet;<br />
import javax.servlet.http.HttpServletRequest;<br />
import javax.servlet.http.HttpServletResponse;</p>
<p>/**<br />
*<br />
* @author chandran<br />
* @WebServlet(name = &#8220;testServlet&#8221;, urlPatterns = {&#8220;/testServlet&#8221;})<br />
*/</p>
<p>public class testServlet extends HttpServlet {</p>
<p>/**<br />
* Processes requests for both HTTP &lt;code&gt;GET&lt;/code&gt; and &lt;code&gt;POST&lt;/code&gt; methods.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
protected void processRequest(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
response.setContentType(&#8220;text/html;charset=UTF-8&#8243;);<br />
PrintWriter out = response.getWriter();<br />
try {</p>
<p>out.println(&#8220;&lt;html&gt;&#8221;);<br />
out.println(&#8220;&lt;head&gt;&#8221;);<br />
out.println(&#8220;&lt;title&gt;Servlet testServlet&lt;/title&gt;&#8221;);<br />
out.println(&#8220;&lt;/head&gt;&#8221;);<br />
out.println(&#8220;&lt;body&gt;&#8221;);<br />
out.println(&#8220;&lt;h1&gt;Servlet testServlet at &#8221; + request.getContextPath () + &#8220;&lt;/h1&gt;&#8221;);<br />
out.println(&#8220;This is just a test servlet&#8221;);<br />
out.println(&#8220;&lt;/body&gt;&#8221;);<br />
out.println(&#8220;&lt;/html&gt;&#8221;);</p>
<p>} finally {<br />
out.close();<br />
}<br />
}</p>
<p>// &lt;editor-fold defaultstate=&#8221;collapsed&#8221; desc=&#8221;HttpServlet methods. Click on the + sign on the left to edit the code.&#8221;&gt;<br />
/**<br />
* Handles the HTTP &lt;code&gt;GET&lt;/code&gt; method.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
@Override<br />
protected void doGet(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
processRequest(request, response);<br />
}</p>
<p>/**<br />
* Handles the HTTP &lt;code&gt;POST&lt;/code&gt; method.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
@Override<br />
protected void doPost(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
processRequest(request, response);<br />
}</p>
<p>/**<br />
* Returns a short description of the servlet.<br />
* @return a String containing servlet description<br />
*/<br />
@Override<br />
public String getServletInfo() {<br />
return &#8220;Short description&#8221;;<br />
}// &lt;/editor-fold&gt;<br />
}<br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/07/15/running-servlets-on-coldfusion-9-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Servlet to render a HTML wrapper to call a flex application for automation</title>
		<link>http://blogs.adobe.com/vikaschandran/2011/07/11/using-a-servlet-to-render-a-html-wrapper-to-call-a-flex-application-for-automation/</link>
		<comments>http://blogs.adobe.com/vikaschandran/2011/07/11/using-a-servlet-to-render-a-html-wrapper-to-call-a-flex-application-for-automation/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 13:08:57 +0000</pubDate>
		<dc:creator>Vikas Chandran</dc:creator>
				<category><![CDATA[FLEX AUTOMATION]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/vikaschandran/?p=432</guid>
		<description><![CDATA[ISSUE Using a servlet to render a HTML wrapper to call a flex application for automation. SOLUTION Please find the sample servlet code which is based on the default HTML wrapper generated by Flash Builder. as long as you have &#8230; <a href="http://blogs.adobe.com/vikaschandran/2011/07/11/using-a-servlet-to-render-a-html-wrapper-to-call-a-flex-application-for-automation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>ISSUE</h2>
<p>Using a servlet to render a HTML wrapper to call a flex application for automation.</p>
<h2>SOLUTION</h2>
<p>Please find the sample servlet code which is based on the default HTML wrapper generated by Flash Builder.</p>
<p>as long as you have mentioned the right SWF name and compiled the SWF to be automation enabled.</p>
<p>you should be able to record and playback automation scripts.</p>
<p>[ NOTE : Also ensure that you have the related files in place</p>
<p>[ history folder, AC_OETags.js, playerProductInstall.swf, automation enabled application SWF file]</p>
<p>you may find them in any project created from Flash builder (can be found in “Bin-Debug” folder or any release build exported from Flash builder) ]</p>
<p>after adding the files your directory structure would look like this.</p>
<p><a class="lightbox" title="Directory Stucture" href="http://blogs.adobe.com/vikaschandran/files/2011/07/DirectoryStucture.jpg"><img class="alignnone size-medium wp-image-433" title="Directory Stucture" src="http://blogs.adobe.com/vikaschandran/files/2011/07/DirectoryStucture-300x97.jpg" alt="" width="300" height="97" /></a></p>
<p>&nbsp;</p>
<p>SERVLET CODE :</p>
<p>/*<br />
* To change this template, choose Tools | Templates<br />
* and open the template in the editor.<br />
*/</p>
<p>import java.io.IOException;<br />
import java.io.PrintWriter;<br />
import javax.servlet.ServletException;<br />
import javax.servlet.annotation.WebServlet;<br />
import javax.servlet.http.HttpServlet;<br />
import javax.servlet.http.HttpServletRequest;<br />
import javax.servlet.http.HttpServletResponse;</p>
<p>/**<br />
*<br />
* @author chandran<br />
*/<br />
@WebServlet(name = &#8220;QtpServlet&#8221;, urlPatterns = {&#8220;/QtpServlet&#8221;})<br />
public class QtpServlet extends HttpServlet {</p>
<p>/**<br />
* Processes requests for both HTTP &lt;code&gt;GET&lt;/code&gt; and &lt;code&gt;POST&lt;/code&gt; methods.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
protected void processRequest(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
response.setContentType(&#8220;text/html;charset=UTF-8&#8243;);<br />
PrintWriter out = response.getWriter();<br />
try {<br />
/*<br />
out.println(&#8220;&lt;html&gt;&#8221;);<br />
out.println(&#8220;&lt;head&gt;&#8221;);<br />
out.println(&#8220;&lt;title&gt;Servlet QtpServlet&lt;/title&gt;&#8221;);<br />
out.println(&#8220;&lt;/head&gt;&#8221;);<br />
out.println(&#8220;&lt;body&gt;&#8221;);<br />
out.println(&#8220;&lt;h1&gt;Servlet QtpServlet at &#8221; + request.getContextPath () + &#8220;&lt;/h1&gt;&#8221;);<br />
out.println(&#8220;&lt;/body&gt;&#8221;);<br />
out.println(&#8220;&lt;/html&gt;&#8221;);<br />
*/</p>
<p>out.println(&#8220;&lt;html lang=\&#8221;en\&#8221;&gt;&#8221;);</p>
<p>out.println(&#8220;&lt;head&gt;&#8221;);<br />
out.println(&#8220;&lt;meta http-equiv=\&#8221;Content-Type\&#8221; content=\&#8221;text/html; charset=utf-8\&#8221; /&gt;&#8221;);</p>
<p>/*  BEGIN Browser History required section */<br />
out.println(&#8220;&lt;link rel=\&#8221;stylesheet\&#8221; type=\&#8221;text/css\&#8221; href=\&#8221;history/history.css\&#8221; /&gt;&#8221;);<br />
/*  END Browser History required section */</p>
<p>out.println(&#8220;&lt;title&gt;&lt;/title&gt;&#8221;);<br />
out.println(&#8220;&lt;script src=\&#8221;AC_OETags.js\&#8221; language=\&#8221;javascript\&#8221;&gt;&lt;/script&gt;&#8221;);</p>
<p>/*  BEGIN Browser History required section */<br />
out.println(&#8220;&lt;script src=\&#8221;history/history.js\&#8221; language=\&#8221;javascript\&#8221;&gt;&lt;/script&gt;&#8221;);<br />
/*  END Browser History required section */</p>
<p>out.println(&#8220;&lt;style&gt;&#8221;);<br />
out.println(&#8220;body { margin: 0px; overflow:hidden }&#8221;);<br />
out.println(&#8220;&lt;/style&gt;&#8221;);<br />
out.println(&#8220;&lt;script language=\&#8221;JavaScript\&#8221; type=\&#8221;text/javascript\&#8221;&gt;&#8221;);<br />
/*<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
// Globals<br />
// Major version of Flash required*/<br />
out.println(&#8220;var requiredMajorVersion = 9;&#8221;);<br />
// Minor version of Flash required<br />
out.println(&#8220;var requiredMinorVersion = 0;&#8221;);<br />
// Minor version of Flash required<br />
out.println(&#8220;var requiredRevision = 124;&#8221;);<br />
// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
// */<br />
out.println(&#8220;&lt;/script&gt;&#8221;);<br />
out.println(&#8220;&lt;/head&gt;&#8221;);</p>
<p>out.println(&#8220;&lt;body scroll=\&#8221;no\&#8221;&gt;&#8221;);<br />
out.println(&#8220;&lt;script language=\&#8221;JavaScript\&#8221; type=\&#8221;text/javascript\&#8221;&gt;&#8221;);<br />
/*<br />
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)*/<br />
out.println(&#8220;var hasProductInstall = DetectFlashVer(6, 0, 65);&#8221;);</p>
<p>// Version check based upon the values defined in globals<br />
out.println(&#8220;var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);&#8221;);</p>
<p>out.println(&#8220;if ( hasProductInstall &amp;&amp; !hasRequestedVersion ) {&#8220;);</p>
<p>// DO NOT MODIFY THE FOLLOWING FOUR LINES<br />
// Location visited after installation is complete if installation is required<br />
out.println(&#8220;var MMPlayerType = (isIE == true) ? \&#8221;ActiveX\&#8221; : \&#8221;PlugIn\&#8221;;&#8221;);<br />
out.println(&#8220;var MMredirectURL = window.location;&#8221;);</p>
<p>out.println(&#8220;document.title = document.title.slice(0, 47) + \&#8221; &#8211; Flash Player Installation\&#8221;;&#8221;);<br />
out.println(&#8220;var MMdoctitle = document.title;&#8221;);</p>
<p>out.println(&#8220;AC_FL_RunContent(&#8220;);<br />
out.println(&#8220;\&#8221;src\&#8221;, \&#8221;playerProductInstall\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;FlashVars\&#8221;, \&#8221;MMredirectURL=\&#8221;+MMredirectURL+\&#8217;&amp;MMplayerType=\&#8217;+MMPlayerType+\&#8217;&amp;MMdoctitle=\&#8217;+MMdoctitle+\&#8221;\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;width\&#8221;, \&#8221;100%\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;height\&#8221;, \&#8221;100%\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;align\&#8221;, \&#8221;middle\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;id\&#8221;, \&#8221;AccordianHeader182345208\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;quality\&#8221;, \&#8221;high\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;bgcolor\&#8221;, \&#8221;#ffffff\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;name\&#8221;, \&#8221;AccordianHeader182345208\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;allowScriptAccess\&#8221;,\&#8221;sameDomain\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;type\&#8221;, \&#8221;application/x-shockwave-flash\&#8221;,&#8221;);<br />
out.println(&#8220;\&#8221;pluginspage\&#8221;, \&#8221;http://www.adobe.com/go/getflashplayer\&#8221;");<br />
out.println(&#8220;);&#8221;);<br />
out.println(&#8220;} else if (hasRequestedVersion) {&#8220;);<br />
// if we\&#8221;ve detected an acceptable version<br />
// embed the Flash Content SWF when all tests are passed<br />
out.println(&#8220;AC_FL_RunContent(\&#8221;src\&#8221;, \&#8221;AccordianHeader182345208\&#8221;,\&#8221;width\&#8221;, \&#8221;100%\&#8221;,\&#8221;height\&#8221;, \&#8221;100%\&#8221;,\&#8221;align\&#8221;, \&#8221;middle\&#8221;,\&#8221;id\&#8221;, \&#8221;AccordianHeader182345208\&#8221;,\&#8221;quality\&#8221;, \&#8221;high\&#8221;,\&#8221;bgcolor\&#8221;, \&#8221;#ffffff\&#8221;,\&#8221;name\&#8221;, \&#8221;AccordianHeader182345208\&#8221;,\&#8221;allowScriptAccess\&#8221;,\&#8221;sameDomain\&#8221;,\&#8221;type\&#8221;, \&#8221;application/x-shockwave-flash\&#8221;,\&#8221;pluginspage\&#8221;, \&#8221;http://www.adobe.com/go/getflashplayer\&#8221;);&#8221;);<br />
out.println(&#8220;} else {  // flash is too old or we can&#8217;t detect the plugin&#8221;);<br />
out.println(&#8220;var alternateContent = \&#8217;Alternate HTML content should be placed here. \&#8217;+ \&#8217;This content requires the Adobe Flash Player. \&#8217;+ \&#8217;&lt;a href=http://www.adobe.com/go/getflash/&gt;Get Flash&lt;/a&gt;\&#8217;;document.write(alternateContent);&#8221;);<br />
// insert non-flash content<br />
out.println(&#8220;}&#8221;);<br />
// */<br />
out.println(&#8220;&lt;/script&gt;&#8221;);<br />
out.println(&#8220;&lt;noscript&gt;&#8221;);<br />
out.println(&#8220;&lt;object classid=\&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\&#8221;");<br />
out.println(&#8220;id=\&#8221;AccordianHeader182345208\&#8221; width=\&#8221;100%\&#8221; height=\&#8221;100%\&#8221;");<br />
out.println(&#8220;codebase=\&#8221;http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab\&#8221;&gt;&#8221;);<br />
out.println(&#8220;&lt;param name=\&#8221;movie\&#8221; value=\&#8221;AccordianHeader182345208.swf\&#8221; /&gt;&#8221;);<br />
out.println(&#8220;&lt;param name=\&#8221;quality\&#8221; value=\&#8221;high /&gt;&#8221;);<br />
out.println(&#8220;&lt;param name=\&#8221;bgcolor\&#8221; value=\&#8221;#ffffff /&gt;&#8221;);<br />
out.println(&#8220;&lt;param name=\&#8221;allowScriptAccess\&#8221; value=\&#8221;sameDomain\&#8221; /&gt;&#8221;);<br />
out.println(&#8220;&lt;embed src=\&#8221;AccordianHeader182345208.swf\&#8221; quality=\&#8221;high\&#8221; bgcolor=\&#8221;#ffffff\&#8221;");<br />
out.println(&#8220;width=\&#8221;100%\&#8221; height=\&#8221;100%\&#8221; name=\&#8221;AccordianHeader182345208\&#8221; align=\&#8221;middle\&#8221;");<br />
out.println(&#8220;play=\&#8221;true\&#8221;");<br />
out.println(&#8220;loop=\&#8221;false\&#8221;");<br />
out.println(&#8220;quality=\&#8221;high\&#8221;");<br />
out.println(&#8220;allowScriptAccess=\&#8221;sameDomain\&#8221;");<br />
out.println(&#8220;type=\&#8221;application/x-shockwave-flash\&#8221;");<br />
out.println(&#8220;pluginspage=\&#8221;http://www.adobe.com/go/getflashplayer\&#8221;&gt;&#8221;);<br />
out.println(&#8220;&lt;/embed&gt;&#8221;);<br />
out.println(&#8220;&lt;/object&gt;&#8221;);<br />
out.println(&#8220;&lt;/noscript&gt;&#8221;);<br />
out.println(&#8220;&lt;/body&gt;&#8221;);<br />
out.println(&#8220;&lt;/html&gt;&#8221;);</p>
<p>} finally {<br />
out.close();<br />
}<br />
}</p>
<p>// &lt;editor-fold defaultstate=&#8221;collapsed&#8221; desc=&#8221;HttpServlet methods. Click on the + sign on the left to edit the code.&#8221;&gt;<br />
/**<br />
* Handles the HTTP &lt;code&gt;GET&lt;/code&gt; method.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
@Override<br />
protected void doGet(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
processRequest(request, response);<br />
}</p>
<p>/**<br />
* Handles the HTTP &lt;code&gt;POST&lt;/code&gt; method.<br />
* @param request servlet request<br />
* @param response servlet response<br />
* @throws ServletException if a servlet-specific error occurs<br />
* @throws IOException if an I/O error occurs<br />
*/<br />
@Override<br />
protected void doPost(HttpServletRequest request, HttpServletResponse response)<br />
throws ServletException, IOException {<br />
processRequest(request, response);<br />
}</p>
<p>/**<br />
* Returns a short description of the servlet.<br />
* @return a String containing servlet description<br />
*/<br />
@Override<br />
public String getServletInfo() {<br />
return &#8220;Short description&#8221;;<br />
}// &lt;/editor-fold&gt;<br />
}<br />
<script type="text/javascript" src="https://sc.omniture.com/p/widget/current/js/widget.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/vikaschandran/2011/07/11/using-a-servlet-to-render-a-html-wrapper-to-call-a-flex-application-for-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
