Hi, thank you for your response.
I am quite new to flex, so I am not sure what you mean by "inspecting." But I 
have put on a trace function activated from "Button" and even if the 
text-contol do not render the html code in "text mode", the trace function show 
the string from the database correct.

Here are the code for the flex component:

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml";
        bottom="20" right="20" left="20"  top="95"
        styleName="ViewStack"
        cornerRadius="6"
        creationComplete="init();"
        width="100%" height="100%">
        
        <mx:Script>
                <![CDATA[
                        
                        import jansInternal.ObjectProxyToAC;
                        import mx.collections.ArrayCollection;
                        import mx.controls.Alert;
                        import mx.rpc.events.ResultEvent;
                        
                        
                        private var dreamData:ArrayCollection;
                        private var dreamDataX:ArrayCollection;
                        [Bindable]
                        private var FinalText:String;
                        private var jjACProxy:ObjectProxyToAC = new 
ObjectProxyToAC;

                        
                        private function init():void {                  
                                ro_1.getData_1(1,1);                            
                                // starts remote object ro_1    
                        }
                        
                        private function getDreamData(e:ResultEvent):void {     
                        
                                dreamData = e.result as ArrayCollection;        
                // Returdata fra Dream.cfc
                                dreamDataX = 
jjACProxy.resultHandler(dreamData);        // jjACProxy puts ArrayCollection in 
OblectProxy
                                FinalText = 
dreamDataX.getItemAt(0).sidetekst_1;        //stores arraycollection            
    
                        }
                        
                ]]>
        </mx:Script>
        
        <!-- Remote object for å jobbe med tabellen "TheSpaceOfLight" -->
        <mx:RemoteObject id="ro_1"
                destination="ColdFusion"
                showBusyCursor="true"
                source="FLEX_CC.TheSpaceOfLight.src.assets.cfc.Dream">
                <mx:method
                        name="getData_1"
                        result="getDreamData(event)" />
                </mx:RemoteObject>
        
        <mx:Panel 
                width="699"
                layout="horizontal"
                right="20" bottom="20" top="20">
                <mx:Text id="dreamText"
                        width="100%" height="100%" 
                        htmlText="{FinalText}" >
                </mx:Text>
                
        </mx:Panel>
        <mx:Button
                x="104" y="597"
                label="Button"
                click="trace(dreamText.htmlText)"/>
        
</mx:Canvas>

PS: I use the same prinsiple in my first application that update tde tatabase. 
So when i load data from the database to the RichTextEditor via the htmlText 
propery, it works fine. The only difference is that the the data from the 
database is first received as a dataprovider for a dataGrid ann then sent to 
the RTE by selecting the datagrid.

Tnaks again.

Jan Johannessen
Norway


--- In [email protected], Gordon Smith <gosm...@...> wrote:
>
> When you inspect dreamText.htmlText and dreamText.text, are they what you 
> expect or are they empty Strings?
> 
> Gordon Smith
> Adobe Flex SDK Team
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of janjohannes...@...
> Sent: Monday, September 14, 2009 10:02 AM
> To: [email protected]
> Subject: [flexcoders] HTML in text control
> 
> 
> 
> I have made two applications:
> 1. Stores text in a MySQL database. I use RichTextEditor to make the text, 
> and then stores the text in the database vith all the HTML tags.
> 2. The other application is a private homepage that loads the text from the 
> database. I use <mx:text> controls to display the text.
> 
> When I bind the receiving input variable from the database to the text 
> control using the text-property, the text control fills up nicely... but with 
> html-coded text. When I bind the input variable from the database to the Text 
> control using the htmlText-property, the text control is empty... or no 
> visable text.
> I have tried using both mx-tags and actionscript, but with the same result.
> 
> Have anybody a clue how to resolve this issue?
> 
> Here are my text control:
> <mx:Text id="dreamText"
> width="100%" height="100%"
> htmlText="{FinalText}" >
> </mx:Text>
> 
> Thanks
>


Reply via email to