![CDATA[ in to textarea, converion to

I use the Spry DataSet to import externa data. In this data, text like 'a<b' is used. To fill the XML Spry dataSet from PhP I use CDATA like;
     <DESCRIPTION>
      <![CDATA[bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>
In the webpage I use Spry dynamic regions, like
     <td spry:content="{DESCRIPTION}"> </td>
All this works fine. " " will be replaced by "bla bla text with a<b or b>a, etc etc..", converting '<' to &lt;, etc. This is the correct (Spry) HTML behaviour.
But sometimes I want to re-use this content for editing. So the {DESCRIPTION} value is copied into a textfield. But now the textfield contains "a&lt;b" and not "a<b". How to fix this behaviour?
How to instruct DataSet.getData()[#]["DESCRIPTION"] to output '<' as is '< ' and NOT &lt;
thank you,
Pieter

Hi Pieter (Oranje for Friday),
I don't fully understand what you are trying to achieve. When I place the variable inside a text field I do not have any problems. Please look at my following code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js"></script>
<script src="SpryAssets/SpryData.js"></script>
<script>
var ds1 = new Spry.Data.XMLDataSet("test.xml", "test/DESCRIPTION");
</script>
</head>
<body>
<div spry:region="ds1">
  <div spry:repeat="ds1">
    <div class="RowColumn"><input name="" type="text" value="{DESCRIPTION}" /></div>
  </div>
</div>
</body>
</html>
I used the following XML-file
<?xml version="1.0" encoding="utf-8"?>
<test>
    <DESCRIPTION>
        <![CDATA[1 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>    
    <DESCRIPTION>
        <![CDATA[2 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>    
    <DESCRIPTION>
        <![CDATA[3 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>    
    <DESCRIPTION>
        <![CDATA[4 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>    
    <DESCRIPTION>
        <![CDATA[5 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>    
    <DESCRIPTION>
        <![CDATA[6 bla bla text with a<b or b>a, etc etc..]]>
    </DESCRIPTION>
</test>
I hope this helps.
Ben

Similar Messages

  • How to set background color for textarea

    Hi all,
    I have created an application in Apex 3.2.
    I am now able to disable the text fields, select lists and textarea.
    Ex:
    function disableDD()
      var v_ddays              = document.getElementById("P2_DELINQUENCY_DAYS");
      v_ddays.value            = "";
      v_ddays.disabled         = true;
      v_ddays.style.background = '#cccccc';
    }The background color thing is working for all the text fields, but the same is not working with the textarea.
    Any help please....

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • Loading Textual Data from HttpService Would Not Show Up on TextArea

    Hi,
      I have something fairly strange here that I have a little problem getting it to work. I am loading some data from XML and attempt to format it a little more on Actiosncript and print it out on the TextArea. For some reason, it would not show up, even though when I used Alert.show it does spit out the entire xml data set. Based on this, I know my data has been loaded correctly, but I am not sure why it is not showing up on my page.
    Here is the code,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:states>   
            <mx:State name="view">
              <mx:RemoveChild target="{intro}"/>
                <mx:AddChild relativeTo="{applicationcontrolbar1}" position="before">
                    <mx:TextArea editable="false" id="viewText" width="450" height="279" text="{messageInfo}"/>
                </mx:AddChild>
            </mx:State>
        </mx:states>
        <mx:Script>
            <![CDATA[
                import mx.events.ItemClickEvent;
                import mx.controls.Alert;
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                [Bindable]private var message:XMLList;
                [Bindable]private var messageInfo:XMLList;
                private var savedIndex:int = 99999;
       private function clickHandler(event:ItemClickEvent):void {
                    if (event.index == savedIndex) {
                        //don't do a thing
                    else {
                        savedIndex = event.index;
                          navigateToURL(new URLRequest("../"+ event.item.data));
                private function toggleButtonBar_itemClick(evt:ItemClickEvent):void {
                    currentState = evt.item.data;
                    if(evt.item.data == "view") view();
               private function view():void{
                  currentState="view";
                  userView.send();          
               private function httpService_fault(evt:FaultEvent):void {
                    var title:String = evt.type + " (" + evt.fault.faultCode + ")";
                    var text:String = evt.fault.faultString;
                    Alert.show("There is an error! Type " + title + " " + text);
               private function httpService_result(evt:ResultEvent):void {
                    messageInfo = XML(evt.result).messages.message;
                    Alert.show(messageInfo);
                    message = XML(evt.result);
                    var message_name:String = "";
                    var message_phone:String = "";
        for each (var message:XML in messageInfo.messages.message) { 
              viewText.text += "Name " + messageInfo.name + "\n";
              viewText.text += "Phone " + messageInfo.phone + "\n";               
            ]]>
        </mx:Script>
    <mx:HTTPService id="userView" url="messages.xml" resultFormat="e4x"
      fault="httpService_fault(event);" result="httpService_result(event)" />
    <mx:PhoneNumberValidator id="pnVal" source="{your_phone}" property="text"/>
    <mx:EmailValidator id="emailVal" source="{your_email}" property="text"/>
        <mx:Array id="dp">
            <mx:Object data="view" label="View"/>
        </mx:Array>
        <mx:Panel id="panel" title="My Home" height="70%">            
        <mx:TextArea id="intro" width="77%" height="100" borderStyle="none" paddingLeft="10" color="black">
                <mx:htmlText><![CDATA[Welcome to my page.]]></mx:htmlText>
            </mx:TextArea>
             <mx:ApplicationControlBar id="applicationcontrolbar1">
            <mx:ToggleButtonBar id="toggleButtonBar" color="#FFFFCC"
                    dataProvider="{dp}"
                    itemClick="toggleButtonBar_itemClick(event);" />
        </mx:ApplicationControlBar>           
        </mx:Panel> 
    </mx:Application>
    Note, there are other items in the array, but those are not relevant to the question of the topic here, and therefore I am not posting the code for those sections.
    When I click on the View button, it does give me the correct state, but I get a blank box of textArea with no data when I know there is output from Alert.show in the view(). What have I missed?
    Thanks for your help.

    Thanks for the pointer. As a matter of fact, I found out that it is because of my xml nodes messing up, and that the text was displayed as white for someb reason. With a white background, of course I would not see a thing.
    Thanks again.

  • How can i display image in mx:TextArea Component?

    I found display img tag in htmlText of mx:TextArea component
    is very difficult in Flex Air
    I new a simple air project in flex builder, put the code
    below in it, i put a glad.png file in the src folder, every thing
    is OK, when i run it, image cannot be displayed. why this happend,
    I search the google for the solution, it seems there is a bug in
    air, and told me to use mx:HTML coponent, but that component still
    can not display img tag.
    could any one help me with this?
    <mx:TextArea width="100%" height="100%">
    <mx:htmlText>
    <![CDATA[
    <a href='
    http://www.adobe.com'><img
    src='glad.png'/></a>Click the image to go to the Adobe
    home page.
    ]]>
    </mx:htmlText>
    </mx:TextArea>

    I ran into a similar problem and wasn't able to find a way to have regular Flex components (like Text and TextArea) display <img> tags in their htmlText.  Everything works find in a web-based Flex application, but once the same code was used in AIR, the images just wouldn't display.
    I changed my display to use the mx:HTML component and everything worked fine (I was using only external images).

  • Problem with CDATA and new line character

    I parse a xml document with org.w3c.dom, the document contain a CDATA section in which there are more lines of text, each line is terminated with the new line character (\n).
    Example:
    <nota>
    <[CDATA[
    first line
    second line
    third line
    ]]>
    </nota>
    When a parse this node:
    Text txt_nota=(Text)elm_nota.getFirstChild();
    String nota=txt_nota.getData();
    the value returned is one string with no new line characters, example:
    "first linesecond linethird line"
    what's wrong?

    Because i use the string nota into a jsp page and i print the string nota into a textarea and the text is with no newline, example:
    <textarea name="nota" rows="4" cols="60"><%= nota %></textarea>
    the text into textarea is:
    first linesecond linethird line
    but i want that the text displayed into textarea is equal the text into the CDATA section:
    first line
    second line
    third line

  • Throwing null object reference , when focus into the spark textarea ,if it is in the popup

    I added a textarea to vrgoup container and added that vgroup as popup to the application. while i am trying to focus into the textarea , it always throwing me null object reference. to see that you need to have debugger version of flash player installed. please help me if anybody knows the solution.
    here is my code.
    code
    protected function btn_clickHandler(event:MouseEvent):void
    var vgroup:VGroup = new VGroup();
    var ta:TextArea = new TextArea();
    vgroup.percentWidth = 100;
    vgroup.addElement(ta);
    PopUpManager.addPopUp(vgroup, this);
    Following is the error thrown
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at spark.components::Scroller/focusInHandler()[E:\dev\hero_private\frameworks\projects\spark \src\spark\components\Scroller.as:1258]
    at flash.display::Stage/set focus()
    at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::setFocus()[C:\Vellum\branches\v2\2.0\dev\out put\openSource\textLayout\src\flashx\textLayout\container\ContainerController.as:2265]
    at flashx.textLayout.container::ContainerController/mouseDownHandler()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController. as:2067]
    at flashx.textLayout.container::TextContainerManager/mouseDownHandler()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:1939]
    at spark.components.supportClasses::RichEditableTextContainerManager/mouseDownHandler()[E:\d ev\hero_private\frameworks\projects\spark\src\spark\components\supportClasses\RichEditable TextContainerManager.as:665]
    at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::requiredMouseDownHandler()[C:\Vellum\branche s\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerControl ler.as:2088]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\hero_private\frameworks\projects\framework\sr c\mx\core\UIComponent.as:13128]
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:2924]

    The simplest example I could come up with consists of 3 files:
    Main.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <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"
                      applicationComplete="open()">
         <fx:Script>
              <![CDATA[
                   import mx.managers.PopUpManager;
                   public function open():void {
                        var popUp:CustomComponent = PopUpManager.createPopUp(
                             this, //parent
                             CustomComponent, //class name
                             true //modal
                        ) as CustomComponent;
                        PopUpManager.centerPopUp(popUp);
              ]]>
         </fx:Script>
    </s:Application>
    CustomComponent.as
    package {
         import spark.components.supportClasses.SkinnableComponent;
         public class CustomComponent extends SkinnableComponent {
              public function CustomComponent() {
                   super();
                   setStyle('skinClass', CustomComponentSkin);
    CustomComponentSkin.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark"
              xmlns:mx="library://ns.adobe.com/flex/mx">
         <fx:Metadata>
              [HostComponent("CustomComponent")]
         </fx:Metadata>
         <s:Panel>
              <s:TextArea/>
         </s:Panel>
    </s:Skin>

  • UndoManager doesn't work when TextArea focusOut

    Hello,
    UndoManager no longer works when the textArea focusOut and I return in the textarea, the history is erased.
    <!-- Simple example to demonstrate the Spark List component -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" width="260" height="480">
              <fx:Script>
        <![CDATA[
              import flashx.textLayout.edit.EditManager;
              import flashx.undo.UndoManager;
              public function comp (e:Event):void{
                        var undoManager:UndoManager = new UndoManager();
                        var editManager:EditManager = new EditManager(undoManager);
                        txt1.textFlow.interactionManager = editManager;
              ]]>
              </fx:Script>
              <s:Panel title="undo" width="240" height="460" horizontalCenter="0" verticalCenter="0">
                        <s:VGroup>
                                  <s:TextArea id="txt1" width="200" height="50"
                horizontalCenter="0" verticalCenter="0" />
                                  <s:Button label="focusOut"/>
                        </s:VGroup>
              </s:Panel>
    </s:Application>
    Thanks

    By default, the undo history is cleared when the RichEditableText component in the TextArea skin loses focus.
    I see in RichEditableText there is a backdoor to change this behavior:
         mx_internal var clearUndoOnFocusOut:Boolean = true;
    so you should be able to add
    import mx.core.mx_internal;
    use namespace mx_internal;
    and this to function comp
    RichEditableText(txt1.textDisplay).clearUndoOnFocusOut = false;
    to get the behavior you want.
    Carol

  • Text in Text File Can't be Loaded into a TextArea

    I am trying to do a very simple task: load the text contained in a text file to a TextArea. The file in question indeed exists.
    Below is my code. I hope someone can point out why the TextArea remains empty.
    TIA,
    mlavie
    The code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
      <![CDATA[
       protected function myButton_clickHandler(event:MouseEvent):void
        var file:File = new File(); 
        file.url = "file:///C:/myTextFile.txt";
        var fileStream:FileStream = new FileStream();
        fileStream.open(file, FileMode.READ);
        var fileText:String = fileStream.readUTFBytes(fileStream.bytesAvailable);
        fileStream.close();
        myTextArea.text = fileText;
      ]]>
    </mx:Script>
    <mx:Button x="116" y="193" label="Button" id="myButton" click="myButton_clickHandler(event)"/>
    <mx:TextArea x="85" y="25" width="251" height="109" id="myTextArea"/>
    </mx:Application>

    Thanks - after I posted I realized that I misunderstood the forum hierarchy.
    In any case, I solved it: I should have used "mx:WindowedApplication" instead of "mx:Application".

  • Flex Mobile textArea styling the text?

    I've read in several documents about TLF not supported in Flex Mobile. I then read about text fields vs textArea and css Style sheets.
    I'm trying to keep this really simple 1. cause I'm learning 2. So I can build on best practices 3. I'm still learning....
    Example:
    Main
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
      creationComplete="creationCompleteHandler(event)">
    <fx:Script>
      <![CDATA[
       import mx.events.FlexEvent;
       [Bindable]
       private var xmlInfo:XML;
       import mx.rpc.events.ResultEvent;
       protected function info_resultHandler(event:ResultEvent):void
        xmlInfo = new XML(event.result.text);← I want to say this is where I need to tell Flex how to interprit the incoming text format.
       protected function creationCompleteHandler(event:FlexEvent):void
        infoXML.send();
      ]]>
    </fx:Script>
      <fx:Declarations>
       <s:HTTPService id="infoXML" url="assets/data.xml"
             resultFormat="e4x"
             result="info_resultHandler(event)"/>
    </fx:Declarations>
      <s:TextArea id="spInfo" text="{xmlInfo}" width="100%"/>
    </s:View>
    data.xml
    <?xml version="1.0" encoding="utf-8"?>
    <info>
    <text><![CDATA[<b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial
    ]]>
    </text>
    </info>
    Mobile app output
    <b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial
    Thank you in advance.

    > How do you mean with the borders Murray? I've never had
    any trouble that
    > I'm
    > aware of? Isn't it fairly common for textfields in forms
    to have a box
    > round
    > them?
    Some browsers (Safari comes to mind) won't do borders at all,
    and others (I
    don't recall which) can actually get surly when you try. I
    don't recommend
    that you try to style form elements to that level.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Iain71" <[email protected]> wrote in
    message
    news:f9up7e$9u1$[email protected]..
    > Cheers - font-family - of course. Think it threw me when
    I typed font :
    > and got
    > the drop down menu.
    >
    > How do you mean with the borders Murray? I've never had
    any trouble that
    > I'm
    > aware of? Isn't it fairly common for textfields in forms
    to have a box
    > round
    > them?
    >
    > Or is there a better method I could be using?
    >

  • DataGrid with TextArea in itemRenderer using drag and drop

    I have a DataGrid and in one of the columns I am using an itemRenderer, in this itemRenderer I have a spark textArea, with this textArea I am have scrolling enabled.  Also with this dataGrid I have drag enabled (for drag/drop). 
    I am seeing two problems if anyone has any suggestions:
    1. When you try to scroll the textArea, dragging kicks in, so you get partial scrolling then dragging.
    2. Using the up/down symbols of the scroller, the scrollbar moves but the text in the dataGrid cell does not.
    Thanks,
    John
    This is the itemRenderer:
    ?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
    implements="mx.controls.listClasses.IDropInListItemRenderer">
    <fx:Script>
    <![CDATA[
    import mx.events.FlexEvent;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.conversion.TextConverter;
    private var _listData:BaseListData;
    [Bindable]
    private var thisTextFlow:TextFlow;
    public function get listData():BaseListData
    return _listData;
    public function set listData(value:BaseListData):void
    _listData = value;
    override public function set data(value:Object):void
    if (value != null)
    super.data = value;
    thisTextFlow = TextConverter.importToFlow(data[(listData as DataGridListData).dataField], TextConverter.TEXT_FIELD_HTML_FORMAT);
    dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
    ]]>
    </fx:Script>
    <s:TextArea id="textArea" textFlow="{thisTextFlow}"
    editable="false" borderVisible="false"
    width="100%"
    contentBackgroundAlpha="0"
    heightInLines="4"
    verticalScrollPolicy="auto" horizontalScrollPolicy="auto"/>
    </mx:VBox>

    Below is code that is working and is re-usable, and if a textArea has a visible scrollbar than when that scrollbar has mouse down/up it sets the dataGrid to dragEnable = false/true to take care of the problem with the textArea dragging and scrolling at the same time.
    One minor thought/issue is:
    1. The size of this renderer using both a VBox and a textArea - but I wanted a scrollable text area that handles textflow.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
    implements="mx.controls.listClasses.IDropInListItemRenderer"
    creationComplete="init()">
    <fx:Script>
    <![CDATA[
    import mx.controls.DataGrid;
    import mx.events.FlexEvent;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.conversion.TextConverter;
    private var dg:DataGrid;
    private var _listData:BaseListData;
    [Bindable]
    private var thisTextFlow:TextFlow;
    private function init():void
    dg = DataGrid(_listData.owner);
    textArea.scroller.verticalScrollBar.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler);
    textArea.scroller.horizontalScrollBar.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler);
    private function mouseDown_handler(event:MouseEvent):void
    dg.dragEnabled = false;
    textArea.scroller.verticalScrollBar.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler);
    textArea.scroller.horizontalScrollBar.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler);
    private function mouseUp_handler(event:MouseEvent):void
    dg.dragEnabled = true;
    textArea.scroller.verticalScrollBar.removeEventListener(MouseEvent.MOUSE_UP, mouseUp_handler);
    textArea.scroller.horizontalScrollBar.removeEventListener(MouseEvent.MOUSE_UP, mouseUp_handler);
    public function get listData():BaseListData
    return _listData;
    public function set listData(value:BaseListData):void
    _listData = value;
    override public function set data(value:Object):void
    if (value != null)
    super.data = value;
    thisTextFlow = TextConverter.importToFlow(data[(listData as DataGridListData).dataField], TextConverter.TEXT_FIELD_HTML_FORMAT);
    dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
    ]]>
    </fx:Script>
    <s:TextArea id="textArea" textFlow="{thisTextFlow}"
    editable="false" borderVisible="false"
    width="100%"
    contentBackgroundAlpha="0"
    heightInLines="4"/>
    </mx:VBox>

  • How to display formated html in a TextArea?

    Hi,
    I'm trying to display some html in a TextArea. But the formatting does not look good.
    here is my mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
         width="100%" height="100%">
              <mx:TextArea id="legend"
                   width="100%" height="100%" editable="false" selectable="false" toolTip="map legend" wordWrap="true">
                   <mx:htmlText>
                        <![CDATA[
                             <p><img src="images/projects.png" /> projects</p>
                             <p><img src="images/publications.png" /> pubpcations</p>
                             <p><img src="images/persons.png" /> persons</p>
                             <p><img src="images/news.png" /> news</p>
                             <p><img src="images/events.png" /> events</p>
                             <p><img src="images/documents.png" /> documents</p>
                        ]]>
                   </mx:htmlText>
              </mx:TextArea>
    </mx:Panel>
    and here is the result...
    Any idea what I am doing wrong?

    I had problems like what you are describing. A picture is worth a thousand words, so take a lookee here: http://www.timos.com/timos/green/ct/CounterThink.cfm. When the app displays, press the link button "About CounterThink", then scroll down to the text block with Mike Adams' photo.
    My problems were fixed when I eliminated all the spaces in the HTML code. My source code for that block now looks like this:
    <p><img src="../../assets/images/green/mike.png" alt="Mike Adams" width="150" height="149" hspace="5" vspace="3" align="left" />The creator of the cartoons, <b>Mike Adams</b> is a consumer health advocate with a mission to teach personal and planetary health to the public He is a prolific writer and has published thousands of articles, interviews, reports and consumer guides, impacting the lives of millions of readers around the world who are experiencing phenomenal health benefits from reading his articles. Adams is an honest, independent journalist and accepts no money or commissions on the third-party products he writes about or the companies he promotes.</p><p></p><p>In 2007, Adams launched EcoLEDs, a manufacturer of mercury-free, energy-efficient LED lighting products that save electricity and help prevent global warming. He's also a successful software entrepreneur, having founded a well known email marketing software company whose technology currently powers the NaturalNews email newsletters.</p><p></p><p>Adams is currently the executive director of the Consumer Wellness Center, a 501(c)3 non-profit, and regularly pursues cycling, nature photography, Capoeira and Pilates. Known as the 'Health Ranger', Adams' personal health statistics and mission statements are located at <a href=http://www.healthranger.org target="_blank"><u>www.HealthRanger.org</u></a>.</p>
    Notice there are no indents, no line breaks, not a single space except for those within the text. The code is a little harder to read this way, but that is what worked. Try it, I hope this works for you. Have fun,
    Carlos

  • Spark ComboBox/TextArea focus interaction

    I have a ComboBox set up to change the font size of the text in a TextArea.  If I set the ComboBox to return focus to the TextArea in its change event, it causes the ComboBox to require 2 clicks to make a selection.  Here's a simple application showing the behaviour that I'm seeeing:
    <?xml version="1.0" encoding="utf-8"?>
    <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">
         <fx:Script>     <![CDATA[
                   import flashx.textLayout.edit.IEditManager;
                   import flashx.textLayout.formats.TextLayoutFormat;
                   protected function sizeChange():void {
                        var format:TextLayoutFormat = new TextLayoutFormat();
                        format.fontSize = comboBox.selectedItem;
                        IEditManager(textArea.textFlow.interactionManager).applyLeafFormat(format);
                        textArea.setFocus();  //Without this line, the combobox works as expected.  With it, you must click on your selection twice to close the combobox
         ]]>     </fx:Script>
         <s:VGroup>
              <s:TextArea id="textArea" />
              <s:ComboBox id="comboBox" change="sizeChange()">
                   <s:dataProvider>
                        <s:ArrayList>
                             <fx:int>10</fx:int>
                             <fx:int>12</fx:int>
                             <fx:int>14</fx:int>
                             <fx:int>16</fx:int>
                             <fx:int>24</fx:int>
                             <fx:int>32</fx:int>
                        </s:ArrayList>
                   </s:dataProvider>
              </s:ComboBox>
         </s:VGroup>
    </s:Application>

    Looks like an editor interaction.  I wouldn't want the ComboBox to ever get
    focus so I'd skip the setFocus call and just set tabFocusEnabled=false and
    mouseFocusEnabled = false;

  • Runtime Error when setting the textFlow of a TextArea with specific size

    Hi All
    When trying to set the textFlow of a Textrea with a specific size (412x258) the flash player crashes because of a 15 sec loop. Could you please help me on this?
    Please find the code below:
    <?xml version="1.0" encoding="utf-8"?>
    <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" minWidth="955" minHeight="600"creationComplete="init()"
    >
    <fx:Script>
    <![CDATA[
    import flashx.textLayout.conversion.TextConverter; 
    private var tfText:String = '<TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" lineBreak="inherit" paddingBottom="inherit" paddingLeft="inherit" paddingRight="inherit" paddingTop="inherit" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="none" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">THE BEAUTIFUL NEW VAGUENESS</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="italic" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="none" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">How do I learn to love the non-predictability of the world?</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">Nothing is as it is forever. Time and again, everything changes. Again and again, the unpredictable happens, chaos breaks out constantly. Things never stay in order, things can never be effectively planned!</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">The problem of contingency, of the non-predictability of personal and professional development, is problematic for many people. Continually, they see themselves questioned existentially. – Delité describes six effective ideas to overcome this problem. With a new attitude to this problem:</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">1. Idea: We are children of evolution</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">2. Idea: Primal fear AND basic trust</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">3. Idea: A sensible attitude towards work</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">4. Idea: The illusion of secondary virtues</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">5. Idea: The end of self-pity</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">6. Idea: Loving life</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">Read more here</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p></TextFlow>'; 
    private function init():void{ 
    this.richText.textFlow = TextConverter.importToFlow(this.tfText, TextConverter.TEXT_LAYOUT_FORMAT); 
    trace(this.richText.text)}
    ]]>
    </fx:Script>
    <s:TextArea name="richText" id="richText" x="0" y="0" width="412" height="258" horizontalScrollPolicy="
    auto" verticalScrollPolicy="auto" selectable="true" borderVisible="
    false" editable="false" contentBackgroundAlpha="0" paddingRight="15"renderingMode="
    cff" fontLookup="embeddedCFF" cffHinting="horizontalStem"/></s:Application>
    The Error details:
    Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
    at flashx.textLayout.compose::BaseCompose/fitLineToParcel()[C:\Vellum\branches\v1\1.1\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:536]
    at flashx.textLayout.compose::ComposeState/composeNextLine()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:312]
    at flashx.textLayout.compose::BaseCompose/composeParagraphElementIntoLines()[C:\Vellum\branc hes\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:3 95]
    at flashx.textLayout.compose::ComposeState/composeParagraphElement()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:272]
    at flashx.textLayout.compose::BaseCompose/composeBlockElement()[C:\Vellum\branches\v1\1.1\de v\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:219]
    at flashx.textLayout.compose::BaseCompose/composeInternal()[C:\Vellum\branches\v1\1.1\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:372]
    at flashx.textLayout.compose::ComposeState/composeInternal()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:134]
    at flashx.textLayout.compose::BaseCompose/composeTextFlow()[C:\Vellum\branches\v1\1.1\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:339]
    at flashx.textLayout.compose::ComposeState/composeTextFlow()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:102]
    at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()[C:\Vellum\branches\v1\1.1\ dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:678 ]
    at flashx.textLayout.compose::StandardFlowComposer/internalCompose()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as: 758]
    at flashx.textLayout.compose::StandardFlowComposer/compose()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:821]
    at flashx.textLayout.container::TextContainerManager/compose()[C:\Vellum\branches\v1\1.1\dev \output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as:1207 ]
    at flashx.textLayout.container::TextContainerManager/updateContainer()[C:\Vellum\branches\v1 \1.1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager .as:1294]
    at spark.components::RichEditableText/updateDisplayList()[E:\dev\4.x\frameworks\projects\spa rk\src\spark\components\RichEditableText.as:2601]
    at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
    at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework \src\mx\managers\LayoutManager.as:663]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:736]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
    Thank you for your support!

    This bug should be fixed in SDK 4.5. Please use the latest SDK.
    My environment is FlashBuilder 4.5 premium and its default SDK 4.5. It's all right on my machine.
    Thanks

  • Reset TextArea Component

    Hi All ... Ok thi smay be a simple question, but being new,
    i'm still finding my way around Flex/Actionscript.
    OK...I have a component with a ComboBox and a TextArea. I
    make an HTTP call to an xml file which loads the "name" into the
    combo and the "description" into the textArea. I have a function
    that sets the selectedIndex=0 every time the page is shown. But how
    can i set the textArea back to the top of the text that is shown.
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var xmlWTFacts:XMLList;
    [Bindable]
    private var xmlWTC:XMLList;
    private function initXML(event:Event):void {
    wtFacts.send();
    wtCourses.send();
    private function resetWhitetime(event:Event):void {
    vsWhitetime.selectedIndex = 0;
    private function resetFacts(event:Event):void {
    cbWTFacts.selectedIndex = 0;
    private function resetTraining(event:Event):void {
    cbWTCourses.selectedIndex = 0;
    private function wtfRH(event:ResultEvent):void {
    xmlWTFacts=event.result.fact as XMLList;
    private function wtCRH(event:ResultEvent):void {
    xmlWTC=event.result.level as XMLList;
    ]]>
    </mx:Script>
    <mx:HTTPService id="wtFacts" url="./xml/wtfacts.xml"
    result="wtfRH(event)" resultFormat="e4x"/>
    <mx:HTTPService id="wtCourses" url="./xml/wtcourses.xml"
    result="wtCRH(event)" resultFormat="e4x"/>
    <mx:LinkBar id="lbWhitetime" x="10" y="5" height="30"
    dataProvider="vsWhitetime"/>
    <mx:ViewStack id="vsWhitetime" y="40" width="100%"
    height="100%">
    <mx:Canvas label="Facts About White Time" height="510"
    width="860" show="resetFacts(event)">
    <mx:HBox x="10" y="10" width="840" height="450"
    horizontalAlign="center" verticalAlign="middle">
    <mx:VBox width="300" height="430"
    horizontalAlign="center" verticalAlign="middle">
    <mx:Label width="250" styleName="myWTLbl" enabled="true"
    textAlign="center" text="A Short List Of Facts"/>
    <mx:Label width="250" styleName="myWTLbl" enabled="true"
    textAlign="center" text="About White Time"/>
    <mx:ComboBox id="cbWTFacts" width="250"
    styleName="myWTLbl" dataProvider="{xmlWTFacts}" labelField="number"
    />
    </mx:VBox>
    <mx:VBox width="500" height="430"
    horizontalAlign="center" verticalAlign="middle">
    <mx:Text width="300" height="200" styleName="myWTTxt"
    text="{cbWTFacts.selectedItem.description}" />
    </mx:VBox>
    </mx:HBox>
    </mx:Canvas>
    <mx:Canvas label="Training Course" height="510"
    width="860" show="resetTraining(event)">
    <mx:HBox x="10" y="10" width="840" height="450"
    horizontalAlign="center" verticalAlign="middle">
    <mx:VBox width="300" height="430"
    horizontalAlign="center" verticalAlign="middle">
    <mx:ComboBox id="cbWTCourses" width="250"
    styleName="myWTLbl" dataProvider="{xmlWTC}" labelField="name"/>
    <mx:Spacer height="200"/>
    <mx:Text width="200" styleName="myWTTxt" enabled="true"
    height="30" text="{cbWTCourses.selectedItem.cost}"/>
    <mx:Text width="200" styleName="myWTTxt" enabled="true"
    height="30" text="{cbWTCourses.selectedItem.duration}"/>
    </mx:VBox>
    <mx:VBox width="500" height="430"
    horizontalAlign="center" verticalAlign="middle">
    <mx:Label width="400" styleName="myWTLbl" enabled="true"
    text="{cbWTCourses.selectedItem.name}" height="30"/>
    <mx:TextArea id="ta1" width="400" styleName="myWTTxt"
    editable="false" wordWrap="true" enabled="true" height="125"
    text="{cbWTCourses.selectedItem.description}"/>
    <mx:TextArea id="ta2" width="400" styleName="myWTTxt"
    editable="false" wordWrap="true" enabled="true" height="250"
    text="{cbWTCourses.selectedItem.outline}"/>
    </mx:VBox>
    </mx:HBox>
    </mx:Canvas>
    </mx:ViewStack>
    </mx:Canvas>
    Many thanks for your help
    Shihan67

    Thanks Jobinesh.I got the solution from this thread
    Re: fields not getting cleared on rollback

  • TextArea hyperlink styling

    Although Flex Builder 3 gives a wide variety of controls over
    the style of a TextArea, I have not found a property that allows
    styling of hyperlinks. I would like to be able to have htmlText
    shown in a TextArea to have styling for hyperlinks, including
    different styles for the pseudo-classes of hover, etc.
    I have seen a couple of complex workarounds for this from FB
    2 days, but would love to find a simple or elegant way to
    accomplish this.
    Thanks in advance,
    James

    I have found a way to do this reasonably easily. Here is what
    I did:
    1. Include in <mx:Application>:
    creationComplete="defineStyles();"
    2. ....which refers to this function and the variable it
    needs:
    <mx:Script>
    <![CDATA[
    public var ss:StyleSheet = new StyleSheet();
    public function defineStyles():void
    this.styledTxt.styleSheet = this.ss;
    var h:Object = new Object();
    h.color = "#970909";
    h.textDecoration = "underline";
    ss.setStyle("a:hover", h);
    var a:Object = new Object();
    a.color = "#0066ff";
    a.textDecoration = "none";
    ss.setStyle("a:link", a);
    var v:Object = new Object();
    v.color = "#0066ff";
    v.textDecoration = "none";
    ss.setStyle("a:visited", v);
    var t:Object = new Object();
    t.color = "#0066ff";
    t.textDecoration = "none";
    ss.setStyle("a:active", t);
    ]]>
    </mx:Script>
    3. And id your TextArea as id="styledTxt"
    -=-=-=-=-=-
    You may of course adjust variables above as needed.
    I am using this for an application that imports blog postings
    through HTTPService, and for my content call I use
    htmlText="{gettheItem.lastResult.item.thetext}" referring to that
    HTTPService call. I mention this so that you can know that this
    styling is working on bulk imported data that has anchor links in
    it and is properly showing them with the styling I have specified.
    Note that this posting from the Flashlit blog was helpful to
    me:
    http://rantworld.blogs.com/flashlit/2006/08/styling_flex_te.html
    I hope this is helpful,
    James

Maybe you are looking for

  • Cannot send email using Gmail after iOS 5

    Since updating to iOS 5, I cannot send email from my Gmail account on my iPhone. I receive email fine, but when trying to send I get the error: Cannot Send Mail Check the settings for the outgoing servers in Settings > Mail, Contacts, Calendars I hav

  • Openkore: Has anyone gotten this to work yet?

    I've been working with this package on and off for the last month or so and have not yet been able to successfully connect to a private server for Ragnarok Online.  Does anyone have any suggestions on how to connect or where I'm limited to connect to

  • How can I restore my photos if the iPad and my lap top back up have been erased to correct a problem?

    How can I retrieve my photos if my iPad was scrubbed to correct a sign-on problem? The "genius" at the Apple Store suggested I erase my back up as well as my iPad apps to avoid a repeat of the problem. He DID NOT tell me all of my photos would be era

  • How to handle f:FACET in the the TR:TABLE?

    Hi buddies, I have a tr:table in which every row will have a <f:facet>. we can add/delete the rows. Since i have the facet inside every row, that will show the parent & child in accordingly. In this scenario, i have expanded the facet by clicking the

  • Import java.sql.*

    I am trying to create and application that connects to a database (MySQL) to do some queries. I put this import java.sql.*; at the top of my file and got this error message "package java.sql does not exist". Can anyone shed some light on this for me?