Thursday, April 21, 2011

Server Side Office Automation using ColdFusion

Tips after fighting to get robust Office Automation using ColdFusion 9.


Definitions
COM: Microsoft Component Object Model.
Automation: the process of launching another application and controlling it programmatically through a public interface.

Environment
ColdFusion 9
Office 2007 SP2

Tips
  • Pay attention to Office version (down to minor rev numbers), I encountered several major differences  between Office 2007, and Office 2007 SP2 (no to mention the differences between 2003 and 2007)
  • Server setup
    • CF service account must be interactive
    • Office installation need to select option to install all features locally
    • After Office installation, need to login as service account, and start Office applications and click through license agreement, registration, ...
  • Open Office applications with Visible=false may have negative impact on it's behavior (At least for Powerpoint, I found some layout options are not functioning correctly if application is started in invisible mode. Specifically, I was trying to set text box property: "Shrink text on overflow", by setting AutoSize=2 (msoAutoSizeTextToFitShape), it won't work unless Powerpoint application is created in visible mode.)
  • Before even start ColdFusion code, I usually test my script using VBS, then translate to CFScript, however, CFScript have some minor difference from VBS:
    • VBScript can use array notation or foreach on some collections, but CFScript  usually has to access the 'items' accessor
    • Explicit type conversion may be necessary in some COM function calls, use "JavaCast". In my case, I got this error message:
An exception occurred when executing a COM method. 
The cause of this exception was that: AutomationException: 0x80048240 - Item 1 not found in the Designs collection. in 'Microsoft Office PowerPoint 2007'. 
Code causing the problem: objPresentation.Designs.Item(1)
Reason: ColdFusion is not type safe. COM definition for this input parameter is variant type. Seems like ColdFusion trying to send it over in string format "1" instead of numeric value 1.
Solution: objPresentation.Designs.Item(JavaCast("int", 1))
    • VBScript can use enumerates just by name, CF does not have that luxury, you have to find out the numeric values for each of the enumerations, please see my other post for list of some numeric values: Some Enum Values for Office COM Object.
  • To find out numeric values, I used Visual Studio to add reference to Office library, then I can easily navigate or search for enums
  • One way to implementation robust automation:
    • Main CFC
      • Create a worker thread to do automation task
      • Wait for the thread with timeout
      • After wait is finished, if it's timeout, will kill automation application, kill thread, and cleanup, else we have successfully done!
    • Automation thread
      • Global lock on Office Application name (avoid concurrency issue)
      • Create automation object
      • <<do you thing>>
      • quit automation object
      • ReleaseCOMObject
      • cleanup
  • To cleanup, I use "pskill" to kill office processes, so that a single failed call won't block all future automation attempts
  • Code segment to create automation object

Server Side Office Automation Problems
  • Office applications are not designed for server environment
  • Concurrency (Office applications are non-reentrant, STA based automation, use global shared resources)
  • Scalability
  • Security
  • May lock up on launch or any point during execution if there are modal dialog popup (typically you will see license agreement, error messages, “install on first use”, … dialogs)
  • License considerations: each client must have licensed copies of Office
  • Officially discouraged by Microsoft
“Microsoft does not recommend or support server-side Automation of Office”
Alternatives
  • CFSpreadsheet
  • HTML/XML based format for word and excel
  • OOXML (Open XML file format)
  • Excel Services (Since Sharepoint Server 2007)
  • Word Automation Services (Since Sharepoint Server 2010)
  • Server libraries: Apach POI, Microsoft Open XML SDK
Reason to Stick with Automation Approach
  • After the above "Problems" section, the biggest incentives to use automation are
    • Need to invoke Excel macro or solution package on server side
    • You already have some fancy VBS code that can do what you wanted through Office automation

References

Adobe. 2011. ColdFusion Developer’s Guide. Last Accessed April 19, 2011. http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Part_4_CF_DevGuide_1.html
Forta, Ben and et al. 2005. Advanced Macromedia ColdFusion MX 7 Application Development, Chapter 26 Extending ColdFusion with COM. Macromedia Press. http://www.forta.com/books/0321292693/0321292693_chapter26.pdf
Microsoft. 2011. KB 257757: Considerations for server-side Automation of Office. Last Accessed April 19, 2011. http://support.microsoft.com/kb/257757

Friday, March 25, 2011

Some Enum Values for Office COM Object

Actual integer values for several Office 2007 (12.0) COM Enums

Microsoft Office Core


MsoAutoSize

msoAutoSizeMixed-2
msoAutoSizeNone0
msoAutoSizeShapeToFitText1
msoAutoSizeTextToFitShape2

Word


WdSaveFormat

wdFormatDocument970
wdFormatDocument0
wdFormatTemplate971
wdFormatTemplate1
wdFormatText2
wdFormatTextLineBreaks3
wdFormatDOSText4
wdFormatDOSTextLineBreaks5
wdFormatRTF6
wdFormatUnicodeText7
wdFormatEncodedText7
wdFormatHTML8
wdFormatWebArchive9
wdFormatFilteredHTML10
wdFormatXML11
wdFormatXMLDocument12
wdFormatXMLDocumentMacroEnabled13
wdFormatXMLTemplate14
wdFormatXMLTemplateMacroEnabled15
wdFormatDocumentDefault16
wdFormatPDF17
wdFormatXPS18
wdFormatFlatXML19
wdFormatFlatXMLMacroEnabled20
wdFormatFlatXMLTemplate21
wdFormatFlatXMLTemplateMacroEnabled22
wdFormatOpenDocumentText23

WdExportFormat

wdExportFormatPDF17
wdExportFormatXPS18

WdAlertLevel

wdAlertsMessageBox-2
wdAlertsAll-1
wdAlertsNone0


PowerPoint


PpSaveAsFileType

ppSaveAsPresentation1
ppSaveAsPowerPoint72
ppSaveAsPowerPoint43
ppSaveAsPowerPoint34
ppSaveAsTemplate5
ppSaveAsRTF6
ppSaveAsShow7
ppSaveAsAddIn8
ppSaveAsPowerPoint4FarEast10
ppSaveAsDefault11
ppSaveAsHTML12
ppSaveAsHTMLv313
ppSaveAsHTMLDual14
ppSaveAsMetaFile15
ppSaveAsGIF16
ppSaveAsJPG17
ppSaveAsPNG18
ppSaveAsBMP19
ppSaveAsWebArchive20
ppSaveAsTIF21
ppSaveAsPresForReview22
ppSaveAsEMF23
ppSaveAsOpenXMLPresentation24
ppSaveAsOpenXMLPresentationMacroEnabled25
ppSaveAsOpenXMLTemplate26
ppSaveAsOpenXMLTemplateMacroEnabled27
ppSaveAsOpenXMLShow28
ppSaveAsOpenXMLShowMacroEnabled29
ppSaveAsOpenXMLAddin30
ppSaveAsOpenXMLTheme31
ppSaveAsPDF32
ppSaveAsXPS33
ppSaveAsXMLPresentation34
ppSaveAsOpenDocumentPresentation35
ppSaveAsExternalConverter36


PpAlertLevel
ppAlertsNone1
ppAlertsAll2


PpAutoSize
ppAutoSizeMixed-2
ppAutoSizeNone0
ppAutoSizeShapeToFitText1

PpSlideLayout
ppLayoutMixed-2
ppLayoutTitle1
ppLayoutText2
ppLayoutTwoColumnText3
ppLayoutTable4
ppLayoutTextAndChart5
ppLayoutChartAndText6
ppLayoutOrgchart7
ppLayoutChart8
ppLayoutTextAndClipart9
ppLayoutClipartAndText10
ppLayoutTitleOnly11
ppLayoutBlank12
ppLayoutTextAndObject13
ppLayoutObjectAndText14
ppLayoutLargeObject15
ppLayoutObject16
ppLayoutTextAndMediaClip17
ppLayoutMediaClipAndText18
ppLayoutObjectOverText19
ppLayoutTextOverObject20
ppLayoutTextAndTwoObjects21
ppLayoutTwoObjectsAndText22
ppLayoutTwoObjectsOverText23
ppLayoutFourObjects24
ppLayoutVerticalText25
ppLayoutClipArtAndVerticalText26
ppLayoutVerticalTitleAndText27
ppLayoutVerticalTitleAndTextOverChart28
ppLayoutTwoObjects29
ppLayoutObjectAndTwoObjects30
ppLayoutTwoObjectsAndObject31
ppLayoutCustom32
ppLayoutSectionHeader33
ppLayoutComparison34
ppLayoutContentWithCaption35
ppLayoutPictureWithCaption36

PpTextStyleType
ppDefaultStyle1
ppTitleStyle2
ppBodyStyle3

Friday, December 17, 2010

Instead of CFDUMP

Ways to inspect CFC returns in browser without using CFDUMP.

1. Using Chrome JSONView extension:
Prerequisite:
Install Google Chrome

Now just add to request URL: "&returnFormat=JSON". The CFC return will be shown in nice hierarchical which can be interactively expanded or collapsed.

2. In IE and FireFox using ServiceCapture
Prerequisite: buy and install ServiceCapture.

Still in request URL, add: "&returnFormat=JSON". In ServiceCapture, Response > JSON will show the data structure in expandable tree structure.

Friday, November 19, 2010

SQL Interview Questions

Here is a collection of Microsoft SQL Server interview questions.
Basic Concepts
  • Filtered index
  • Common Table Expression
  • Derived tables
  • Fill factor
  • Clustered Index
  • Heap table
  • OLTP vs. OLAP
  • Star schema
  • What are the differences between SQL developer, standard and enterprise editions
  • local vs. global temporary table
  • sparse columns
  • Functions: STUFF, PATINDEX, RANK, NTILE
  • SCOPE_IDENTITY vs. @@IDENTITY
  • XML support
  • Geo-spatial data support
  • CLR integration
  • Replication
Breadth
  • NoSQL
  • Column based RDBMS
Best Practices
  • What are the performance best practices
  • What are the security best practices
Coding Skills
  • How to select top N records without using TOP
  • Write a stored procedure to check out one job with columns: JobID, Status (new, checked out, done), priority
  • Write a stored procedure to atomically insert records into the following tables with error handling
Table A
---------
ID
Name

Table B
---------
ID
Name

Table A_B
---------
ID_A
ID_B

Wednesday, October 27, 2010

Tuesday, September 07, 2010

Laptop Performance vs. Network Drive

Symptom: When working from home using a company laptop, ever notice that the corporate laptop appears to be much slower on your home network? Well, I have had this problem for a while. After a closer look, I found whenever I switch to Windows Explorer or trying to open a file, it will take almost a minute for it to showup.

Root Cause: In my case, I found out the root cause is actually a bunch of network drives that are causing this performance problem.
There are 4 network mapped drives on my laptop which access various resources on intranet. Some are setup by IT so that they will be mapped whenever you boot you computer on company intranet. However, at home, connection to intranet is slow or non-existent. Whenever you make Windows Explorer visible or showing a File dialog, Windows explorer will try to map all of them one by one. That is, the more network drives you have, the longer you have to wait until Windows decide to give up on reconnecting these network drives.

Solution: I end up created a VB script to batch start/stop the mapping. At home with limit access to internet, I will run the scripts to stop all the mapped drives. At work, I will run the script to start the mapping.

The vb script to stop network drive:
Set objNetwork = CreateObject("WScript.Network")
On Error Resume Next
objNetwork.RemoveNetworkDrive "X:", "True"
objNetwork.RemoveNetworkDrive "Y:", "True"
objNetwork.RemoveNetworkDrive "Z:", "True"

To start network drive:
Set objNetwork = CreateObject("WScript.Network")
On Error Resume Next
objNetwork.MapNetworkDrive "X:" , "[your URI]"
objNetwork.MapNetworkDrive "Y:" , "[your URI]"
objNetwork.MapNetworkDrive "Z:" , "[your URI]"

Friday, September 03, 2010

What's in a RIA Software Engineer's Tool Chest

Major Power Tools
  • Microsoft Visual Studio
  • Adobe Flex Builder, Flash Builder
  • Adobe Coldfusion Builder
  • SQL Server Management Studio
Browsers
  • IE
  • FireFox
  • Google Chrome
Eclipse Plugins

Firefox Plugins
  • Firebug
  • Html Validator
  • Screengrab: take screenshots of browser content (including Flash)
  • YSlow
  • Web Developer

Free or really affordable utilities
  • Data Dictionary Creator: manage and generate data dictionary
  • Service Capture: capture HTTP traffic in/out of local computer, with built-in parser of Flash Remoting content
  • Fiddler: capture HTTP traffic, well known in .NET community
  • JSON Viewer: all you can ask for to navigate, search, format JSON data string
  • VNC: remote desktop
  • Tortois SVN, CVS, GIT: version control with Windows Explorer integration
  • Tour De Flex: Air application showcasing Flex controls and sample code
  • Skype: IM, talk, video conference, share desktop, ...
  • Google Desktop: search code, design document with ease
  • GIMP: free replacement for Photoshop
  • Sysinternals: a group of Windows Utilities now owned by Microsoft. Here are a few of my favorites:
    • Process Explorer: advance task manager, mostly used to search for locked resources
    • Port Mon: serial port traffic analyzer
    • Autoruns: manage autorun programs that can start through various mechanisms
  • Depends: Dependency Walker
  • WinMerge: graphical diff, can be easily integrated with Tortoise clients

Online Resources in Browser Bookmarks
  • Google Code Search: search open source code
  • Google Analytics: keep tab on web site usage
  • Stackoverflow: ask questions, search for answers, and answer some questions. Occasionally get job offers due to your answers here
  • EETimes: resource on embedded, semiconductor development
  • TechCrunch
  • DZONE: daily digest of tech blogs similar to TechCrunch
  • ScottGu's Blog: MSFT VP of several .NET products
  • MIX: Video, PPT of past conference
  • PDC: Video, PPT of past conference
  • GOOGLE IO: Video of past conference
  • BeanStalk: online SVN server
  • Github: onlien GIT server
  • Gist: code snippet management
  • CFLib.org: Coldfusion library

Open Source Software
  • FlexLib: Flex controls
  • AS3Core: Actionscript 3 utilities
  • PureMVC: MVC framework, popular in Flex community
  • Cairngorm: official MVC framework in Flex community
  • Report.NET: .NET PDF library
  • ZedGraph: .NET chart library
  • SQLite: light-weight database, popular in embedded community
  • NUnit: .NET unit testing framework
  • FlexUnit: Flex unit testing framework
Icons
  • Java Look and Feel Graphics Repository: official JAVA icon set
  • Visual Studio Image Library: came with Visual Studio Installation
  • Web Application Icons from WebAppers.com
  • famfamfam.com

Thursday, September 02, 2010

Flex Builder - TODO, FIXME in "Tasks" view

Here is a plugin that adds support for TODO comments in "Tasks" view.
http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757

It was created for Flex Builder 2 in 2006, but I tested, it also works for Flex Builder 3.

Here is link to the request on Adobe's JIRA: FlexBuilder should parse //TODO comments into the normal Task panel . I have voted for this issue.

However, Dirk obviously did a good job in his plugin, such that Adobe decided to defer and closed the issue!?

Wednesday, August 25, 2010

Import Android Samples into Eclipse

I am trying to open Android samples in Eclipse (with ADT installed). At first, it seems to be a tedious task, trying to import every single project. Then, I found out that ADT already has a shortcut for importing samples. Just go File > New Android Project. In the "New Adroid Project" dialog, select the Build Target, then check "Create project from existing sample". Now, in the dropdown below select the project you want to import. It is much simpler than I thought.



Well, of course, it would be even better, if the sample projects have Eclipse project in them. That will save me even more time.

Wednesday, August 18, 2010

SQL Scripts for CLR Assemblies

Here are SQL Scripts for CLR assemblies on Microsoft SQL Server.

Assumptions: assembly's name: "SQLCLR.dll".In the dll, you have an aggregate function: "ConcateAll" which concatenate all string. The dll is in database server's c:\temp directory.

To enable CLR on SQL Server:


To clean up (remove the CLR function and assembly from database)


To upload assembly to SQL Server


Create aggregate function based on CLR assembly


Grant execution permission to user

Monday, July 26, 2010

MS SQL Column Alias

T-SQL used in Microsoft SQL Server seem to have very limited support for column alias. If you have a complex calculated column that you want to re-use in GROUP, SELECT or another expression, it will be desirable to use alias to reference the same definition everywhere so that we can have a clear and easier to understand SQL statement.


Here is an article that is very helpful in this matter: Avoid Transact-SQL's Column Alias Limitations

Key points:
  • MS SQL only allow alias in SELECT and ORDER BY
  • Use sub-query, can help in some cases to re-use column alias

Thursday, July 15, 2010

Coldfusion web services call return error: java.lang.NullPointerException

Turns out Coldfusion web services return data may contain pointer, and the receiving side will try to interpret that pointer. Once we commented out the offending data (a 2D array) in return, the error is gone.

Wednesday, July 14, 2010

DELL Quickset for Latitude E-Family

Just got a new Dell Latitude E6510 laptop. However, cannot find the familiar Dell Quickset on it.

After a couple of days' casual research, I finally found the answer: Dell Control Point is the new Quickset for Latitude E-Family.

As a side note, I like E6510.
Pros:
  • Fast
  • Bright screen
  • Nice keyboard: backlight, good touch
  • Multi-touch, allow pinch zoom, rotations, and other gesture
  • ... more
Cons: none so far.

Wednesday, July 07, 2010

Syntax Highlighting on Blogger - Gist

Here is another way to paste code into blogger with nice syntax highlighting.
  1. Go to http://gist.github.com
  2. Past the code you want to post
  3. Copy the embed tag
  4. Go back to blogger, and select "Edit Html"
  5. Paste the embed tag into your post
Below is the example source code using this tag: <script src="http://gist.github.com/467670.js?file=gistfile1.sql"></script>




A potential drawback of this approach might be the stability of github as a company. In a downturn, it may shut down with very short notice.

Compare to using SyntaxHighlighter, personally, I think this approach is way better:
  1. No setup required (in a previous post I documented how to setup syntaxhighlighter for blogger, it took me half an hour to setup everything correctly. Now with gist, there is zero setup required );
  2. Faster to create code snippet in a post;
  3. Supports more languages;
  4. No need to worry about pasting XML, HTML, or other special characters;


To paste script like below used to require replacing '<' with &lt; and '>' with &gt; manually. Now is simply copy paste without any manual changes:

Flex Builder Error 1046: "Type was not found or was not a compile-time constant"

Problem:
While editing a big .as file in Flex Builder 3, the compile is broken suddenly. Got this error:
1046: Type was not found or was not a compile-time constant: ?????.


Cause:
Seems like Flex editor tend to wrongly remove import statement at the top of .as file without user consent.

Solution:
Disable Flex Builder feature:
Windown > Preferences > Flex > Editors > ActionScript Code, uncheck "Remove unused imports when organizing"

Tuesday, June 29, 2010

ColdFusion Builder Error: "Unhandled event loop execution"

Environment: Eclipse 3.5, ColdFusion Builder Plugin, Aptana

Problem:
Whenever I open a Coldfusion file, will see error "Unhandled event loop exception." followed by a dialog: "An error has occured. See error log for more details. CFMOutlinePage_0".

Cause:

Turns out CF Builder is using Aptana which conflict with the lastest Aptana.

Solution:
Disable Aptana:
  • Disable Aptana: Windows -> Preferences -> General -> Startup and Shutdown, uncheck all Aptana plugins;
  • Disable Aptana Update: Windows -> Preferences -> Install/Update -> Available Software Sites, disabled all Aptana sites;
  • Restart Eclipse using the "-clean" command line, and the problem seems to be fixed now.
Another riskier solution is to uninstall Aptana Studio from Eclipse.
  • Copy current Eclipse directory for backup;
  • Help > About Eclipse > Installation Details > Installed Software > Aptana Studio > Uninstall
More Info:
---------------Detailed Error Log-------------------------
eclipse.buildId=
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -clean


Error
Tue Jun 29 10:45:04 PDT 2010
Unhandled event loop exception

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoSuchFieldError: EditorUpdaterThread_0)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.NoSuchFieldError: EditorUpdaterThread_0
at com.adobe.ide.editor.cfml.EditorUpdaterThread.createDelayedRefreshJob(EditorUpdaterThread.java:340)
at com.adobe.ide.editor.cfml.EditorUpdaterThread.access$1(EditorUpdaterThread.java:338)
at com.adobe.ide.editor.cfml.EditorUpdaterThread$1.run(EditorUpdaterThread.java:265)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
... 22 more

-------------Screenshot of the error dialog--------------------------------------

Thursday, June 24, 2010

Visaul Studio Strong Name Error - Importing key file "X.pfx" was canceled

Problem:
Getting a new computer, so I installed fresh Visual Studio 2010, and checked out source code from SVN. Then I got the following errors:

Cannot import the following key file: X.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_F...


Importing key file "X.pfx" was canceled
Solution:
Run this command line:
sn -i X.pfx VS_KEY_F...

Wednesday, June 23, 2010

Flex Compiler Error - Could not resolve * to a component implementation

While extending MX control ComboBox, I am trying to alter it's property.

<mx:dropdownfactory>
<mx:component>
<mx:tree change="outerDocument.updateLabel()" height="200" allowmultipleselection="{outerDocument.allowMultipleSelection}" showroot="{outerDocument.showRoot}" showdatatips="true" datatipfield="{outerDocument.labelField}">
</mx:tree>
</mx:component>
</mx:dropdownfactory>

I got the compiler error as stated in the tile. Turns out I should refer to the property using my custom control's own name space. So the code should be like this:

<local:dropdownfactory>
<mx:component>
<mx:tree change="outerDocument.updateLabel()" height="200" allowmultipleselection="{outerDocument.allowMultipleSelection}" showroot="{outerDocument.showRoot}" showdatatips="true" datatipfield="{outerDocument.labelField}">
</mx:tree>
</mx:component>
</local:dropdownfactory>