출처 : http://warkyman.tistory.com/146

Flex 에서 MXML로 정의한 버튼이 다음과 같이 있다고 가정합니다.

 <mx:Button id="btnAlert"  label="Alert!" />


이 버튼을 클릭할 때 어떠한 동작을 하고자 하면 해당 버튼에 다음과 같이 클릭 이벤트 핸들러를 등록시켜주면 됩니다.

Script ---

public function alert(evt:MouseEvent):void
{
  Alert.show("Hello, Flex!", "Alert");
}

MXML ---

 <mx:Button id="btnAlert" label="Alert!" click="alert(event)" />


만약, 실제 버튼을 클릭하지 않고서 버튼을 클릭한 것과 같은 이벤트를 수동으로 발생시키려면 어떻게 해야할까요?
이럴때 필요한 것이 dispatchEvent 입니다.

dispatchEvent 의 구조는 다음과 같습니다.
objectInstance. dispatchEvent(event:Event)

자세한 설명은 수동에 의한 이벤트의 송출(Dispatch)  에서 참고하도록 하고 본 포스트에서는 생략하겠습니다.


아래에 보여드릴 소스는 캔버스를 MXML로 정의하여 이 캔버스를 클릭하였을때 버튼을 클릭한 것 과 같이 수동으로 이벤트를 발생시킴으로써 버튼을 클릭하였을 때와 같이 팝업이 뜨도록 하고 있습니다.

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">

    <mx:Script>
        <![CDATA[
   
        import mx.controls.Alert;

        public function alert(evt:MouseEvent):void
        {
            Alert.show("Hello, Flex!", "Alert");
        }

        public function canvasClick(evt:MouseEvent):void
        {
            btnAlert.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
        }

        ]]>
    </mx:Script>

    <mx:Canvas x="44" y="79" width="200" height="153" backgroundColor="#FF0000" borderStyle="solid"
            cornerRadius="20" click="canvasClick(event)">
        <mx:Label text="Click Here!" horizontalCenter="0" verticalCenter="0"/>
    </mx:Canvas>

    <mx:Button id="btnAlert" x="271" y="137" label="Alert!" click="alert(event)"/>

</mx:Application>

dispatchEvent 를 이용하여 마치 버튼을 클릭한 것 처럼 MouseEvent.CLICK 이벤트를 버튼에 dispatch 함으로써 버튼에서 클릭 이벤트 핸들러로 등록해놓은 alert() 메소드가 실행되게 됩니다.

[Flash] http://warkyman.tistory.com/attachment/fk170000000001.swf


물론 위의 예제에서는 단순히 클릭시에 Alert 을 띄우는 작업으로 그쳤기에 문제가 없었지만, 실제 클릭이벤트와 관련된 작업이 필요할 경우 새로 생성해준 마우스이벤트 (new MouseEvent(MouseEvent.CLICK)) 의 상세한 값들을 제어할 필요가 있습니다.

MouseEvent (type:String , bubbles:Boolean = true, cancelable:Boolean = false, localX:Number , localY:Number , relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, buttonDown:Boolean = false, delta:int = 0)

와.. 많다.;;;


Posted by 나비:D
:

[Flash] http://blog.jidolstar.com/attachment/1285711347.swf




위의 소스는 FlexComponent 카페에서 시난님이 만든 "XML의 자식을 가지고 있는 마지막 노드 알아내기(http://cafe.naver.com/flexcomponent/3755)" 글을 보고 아이디어를 얻었다. 시난님이 이것을 만들게 된 계기는 카페 주인장이신 브라이언 님이 WithFlex.com에서 운영할 Flex로 만든 트리메뉴를 같이 만들자고 제안을 했기 때문이다. 그렇지 않아도 Tree메뉴가 필요할 것 같아서 만들려고 하던 참이였는데 동지를 만난것 같아 넘 좋다.

동작은 아직 미비한 편이지만 http://blog.jidolstar.com/18 에서 만든 것에 기능을 개선시켰다.
개선된 기능은 다음과 같다.


  1. 전체펼치기/접기 기능 추가
  2. 선택된 노드 펼치기/접기 기능추가
  3. 찾을 노드 id를 입력하여 해당 노드를 펼치고 선택하기 기능 추가

프로그램은 아직 실용성은 없으며 계속 보완해가고 있는 중이다. 최종 결과물은 각 노드의 위치를 바꾸고 서버에 비동기적으로 통신하여 수정할 수 있게 만들어갈 예정이다.

사용한 XML 파일은 다음과 같다.


<?xml version="1.0" encoding="utf-8" ?>
<root>
    <msg>ok</msg>
    <nodes>
        <node id="a" label="홈">
            <node id="b-1" label="제품">
                <node id="c-1" label="플렉스" />
                <node id="c-2" label="플래시" />
            </node>
            <node id="b-2" label="도움말">
                <node id="c-3" label="플렉스 라이브 문서" />
                <node id="c-4" label="플래시 라이브 문서" />
            </node>
            <node id="b-3" label="커뮤니티">
                <node id="c-5" label="플렉스 커뮤니티">
                    <node id="d-1" label="플렉스컴포넌트 카페" />
                    <node id="d-2" label="어도비유저그룹" />
                </node>
                <node id="c-6" label="플래시 커뮤니티" />
            </node>
        </node>
    </nodes>
</root>

           
프로그램 소스는 http://blog.jidolstar.com/18 에서 올린 것과 다르게 Tree를 상속받아서 사용했다. 나중에 나만의 컴퍼넌트를 만들어 아무때나 사용하기 위해서이다.

파일명 : TreeTest.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " layout="absolute"
  initialize="System.useCodePage=true"
  xmlns:js="com.jidolstar.components.*" creationComplete="init()">
 <mx:Script>
  <![CDATA[
   private function init():void
   {
    myTreeXMLMenu.setCrossDomain("crossdomain.xml 파일 url");
    myTreeXMLMenu.request("XML파일 url");  
   }
  ]]>
 </mx:Script>
 <mx:Style>
  Application
  {
   fontSize:12pt;
  }
 </mx:Style>
 <mx:Panel width="500" height="300"
  layout="absolute" title="동적으로 바인드되는 XML Tree 메뉴+Node찾아펼치기-jidolstar.com">
  <mx:VBox width="100%" height="100%">
   <js:TreeXMLMenu id="myTreeXMLMenu" width="100%"/>
   <mx:HBox>
    <mx:Label text="찾을 노드 ID"/>
    <mx:TextInput width="100" id="findValue" text="d-2"/>
    <mx:Button label="찾기" click="myTreeXMLMenu.find(findValue.text)"/>
   </mx:HBox>
   <mx:HBox>
    <mx:Button label="전체펼치기" click="myTreeXMLMenu.expandAll(true)"/>
    <mx:Button label="전체접기" click="myTreeXMLMenu.expandAll(false)"/>
    <mx:Button label="선택된노트 접기/펼치기" click="myTreeXMLMenu.expand()"/>
   </mx:HBox>
  </mx:VBox>
 </mx:Panel>
</mx:Application>



파일명 : com.jidolstar.componet.TreeXMLMenu.mxml
 


<?xml version="1.0" encoding="utf-8"?>
<mx:Tree xmlns:mx="http://www.adobe.com/2006/mxml "    
    labelField="@label"
    dataProvider="{xlcData}"
    showRoot="false" creationComplete="init()">
 <mx:Script>
  <![CDATA[
   import mx.collections.*;
   import mx.controls.Alert;
   import mx.rpc.events.FaultEvent;
   import mx.rpc.events.ResultEvent;
   import mx.rpc.http.HTTPService;
   import flash.system.Security;

   public var httpServ:HTTPService;
   
   [Bindable]
   public var xlcData:XMLListCollection;
   
   ////////////////////////////////////////////
   // 초기화
   // HTTPSerivce를 생성
   ////////////////////////////////////////////
   public function init():void
   {
    httpServ = new HTTPService();
   }  
   
   ////////////////////////////////////////////
   // CrossDomain 설정
   ////////////////////////////////////////////  
   public function setCrossDomain(url:String):void 
   {
    Security.loadPolicyFile(url);
   }
   
   ////////////////////////////////////////////
   // XML 요청
   // 1. POST방식으로 요청하고  결과물을 E4X형태로 한다.
   // 2. 결과를 받기 위해 Listener Handler함수를 선언
   ////////////////////////////////////////////
   public function request(url:String , params:Object=null):void
   {
    this.httpServ.url = url;
    this.httpServ.method = "POST";
    this.httpServ.resultFormat="e4x";
    this.httpServ.addEventListener("result", resultHandler);
    this.httpServ.addEventListener("fault", faultHandler);
    this.httpServ.send(params);
   }

   ////////////////////////////////////////////
   // XML 결과를 받았을 경우
   // 1. XMLList에 결과를 임시로 저장
   // 2. 적합한 데이타인지 확인
   // 3. nodes요소만 XMLListCollection으로 생성
   // 이는 동적으로 Tree에 바인드[Bindable]됨
   ////////////////////////////////////////////  
   private function resultHandler(e:ResultEvent):void
   {
    var xlData:XMLList = new XMLList(e.result);
    if(xlData.elements("msg").toString()!="ok")
    {
     mx.controls.Alert.show(xlData.elements("msg").toString(),"Error");
    }
    else
    {
     xlcData = new XMLListCollection(xlData.elements("nodes"));
    }       
   }
   
   ////////////////////////////////////////////
   // XML 데이타 요청에 대한 실패가 있을 경우 호출됨
   ////////////////////////////////////////////  
   private function faultHandler(e:FaultEvent):void
   {
    mx.controls.Alert.show("XML정보 읽어오기 실패\n"+e.fault.faultString);
   }
   
   ////////////////////////////////////////////
   // Tree 전체를 접고 펼침
   ////////////////////////////////////////////
   public function expandAll(open:Boolean):void
   {
    var xlc:XMLListCollection = this.dataProvider as XMLListCollection;
    var nodeList:XMLList = xlc.descendants();
    trace(nodeList.length());
    for(var i:int=0; i<nodeList.length(); i++)
    {
     trace(nodeList[i]);
     this.expandItem(nodeList[i], open, false);
    }
   }
   
   ////////////////////////////////////////////
   // 선택한 Node 접고 펼침
   ////////////////////////////////////////////  
   public function expand():void
   {
    var selectedNode:Object=this.selectedItem;
    trace(selectedNode);
    if(this.isItemOpen(selectedNode)==true)
    {
     this.expandItem(selectedNode, false);    
     trace("close");
    }
    else
    {
     this.expandItem(selectedNode, true);    
     trace("open");
    }
   }
   
   ////////////////////////////////////////////
   // 인자로 넘어온 id값을 찾는다.
   ////////////////////////////////////////////  
   public function find(id:String):Boolean
   {
    var xlc:XMLListCollection = this.dataProvider as XMLListCollection;
    var nodeList:XMLList = xlc.descendants();
    trace(nodeList.length());
    for(var i:int=0; i<nodeList.length(); i++)
    {
     trace(nodeList[i].@id.toString());
     if(nodeList[i].@id.toString() == id)
     {
      trace(i);
      break;
     }
    }
    if(i == nodeList.length())
    {
     trace("id='"+id+"'는 없음");
     return false;
    }
    expandParents(nodeList[i]);
    this.selectedItem = nodeList[i];
    return true;
   }
   
   ////////////////////////////////////////////
   // 인자로 넘어온 node의 부모를 전부 펼친다.
   ////////////////////////////////////////////
   protected function expandParents(xmlNode:XML):void
   {
    if(xmlNode == null)
    {
     return;
    }
    while (xmlNode.parent() != null && xmlNode.localName().toString() == "node")
    {
     xmlNode = xmlNode.parent();
     this.expandItem(xmlNode, true, false);
    }
   }

  ]]>
 </mx:Script>
 
</mx:Tree>



글쓴이 : 지돌스타 (http://blog.jidolstar.com/18  )
Posted by 나비:D
:
Posted by 나비:D
:

unable to load SWC multiple points

Cairngorm Framework 강좌를 보면서 따라하기 했습니다...


하지만 아래와 같은 문구의 오류가 나더군요

unable to load SWC Cairngorm.swc: multiple points


구글검색도 해봤지만 영문 ㅡㅡ;;; 머 대충 네이버 툴바 이용해서 단어 하나씩 해결하면서 보니까


Here are the steps:

  1. Download the Cairngorm src .zip
  2. Unzip into a folder on your machine
  3. Import the .project file into Flex Builder
  4. Hit Project -> Clean for a nice clean build

요런 게 있더군요 하지만 이방법으로도 되지 않는다!


그러면 플렉스 버전 확인해보세요 ㅋㅋㅋ


테스트 환경이 노트북과, 데스크탑으로 했는데

노트북의 경우 플렉스 2.0.1 이였고

데스크탑의 경우 플렉스 2.0.1. 123.... 머시긴가 여튼 좀 길었습니다.


결과 노트북은 위와 같은 메시지가 뜨지 않터군요

데스크탑은 여전히 저런 메시지를 팍팍 뿌려 주면서 캔곰을 못 쓰게 만들고요 ㅡㅡ;;;


그래서 데스크탑의 플렉스 버전도 2.0.1로 바꿧습니다 ㅋㅋ 되내요 ㅋㅋㅋㅋ 야호 ㅋㅋㅋ


다른분들도 혹시 이런 메시지나 오류가 나면 플렉스 버전을 2.0.1로 마춰보세요 ㅡㅡV

플렉스 버전 2.0.1 에는 정상작동

플렉스 버전 2.0.1 14.. 머시기는 작동 불등

상위 버전은 모르겠음 ^^;;;

unable to load SWC Cairngorm.swc: multiple points

Flex Builder Version 2.0.1 !!!!

Version 2.0.1 14.... NO!!

Only Version 2.0.1!!

Posted by 나비:D
:
DataGrid Tip: Row Background Color

How to change the background color of a row is an often-asked question. In Flex 2.0 it is easy. Follow these steps:

  1. Create a new class that extends mx.controls.DataGrid. This class can be an MXML file or an ActionScript file, whichever you are most comfortable with.
  2. Overide the protected function, drawRowBackground:

        override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number,
                                                       color:uint, dataIndex:int):void
       {
            // make any tests here, then change color accordingly. For example: color = 0xFF0000;
            // call the super function to make it happen.
            super.drawRowBackground(s,rowIndex,y,height,color,dataIndex);
        }
  3. Now use your new grid in place of the <mx:DataGrid> in your application.

Within drawRowBackground you can test your data. The dataIndex argument can be used to look up the item in the dataProvider that corresponds to this row. For example, suppose you want to color any row green whose quantity is greater than 1000:

var item:Object = (dataProvider as ArrayCollection).getItemAt(dataIndex);
if( item.quantity > 1000 ) color = 0x00FF00;

It's just that easy.

출처 : http://weblogs.macromedia.com/pent/archives/2006/10/datagrid_tip_ro.cfm

Posted by 나비:D
:

출처 : http://www.ihelpers.co.kr/programming/tipntech.php?CMD=view&TYPE=8&KEY=&SC=S&&CC=&PAGE=1&IDX=547

1.데모

2. 소스

MiyaGrid.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
 layout="absolute" xmlns:ns1="*" creationComplete="initApp()" viewSourceURL="srcview/index.html" fontSize="12">
 <mx:Script>
  <![CDATA[
   import mx.controls.dataGridClasses.DataGridColumn;
   import mx.collections.ArrayCollection;
   import mx.controls.Alert;
   
   [Bindable]
   private var ArrCol:ArrayCollection = new ArrayCollection();
   
   
   public function initApp():void{    
    myGrid.dataProvider = ArrCol;    
   }
   
   public function onChangeColumn():void{
   
    // Grid init
    myGrid.columns = [];
    ArrCol.removeAll();
    var arrCol:Array = new Array();
   
    for(var i:uint = 0; i<chgColumn.value;i++){
     var col:DataGridColumn = new DataGridColumn("col"+i);
     var colRender:ClassFactory = new ClassFactory(LabelRenderer);    
     colRender.properties = {headerText:"컬럼"+i};
     col.headerRenderer = colRender;  
     col.setStyle("textAlign","right");
     arrCol.push(col);
    }
    myGrid.columns = arrCol;  
   
    for(i=0;i<100;i++){
     var colval:Object = new Object;
     for(var j:uint = 0; j<chgColumn.value;j++){
      colval["col"+j] = (i+1)*(j+1);
     }
     ArrCol.addItem(colval);
    } 
   }
  ]]>
 </mx:Script>
 <mx:Component id="HeaderLabelRenderer">  
     <mx:HBox horizontalAlign="left" verticalAlign="middle">
     <mx:Label text="" textIndent="3" width="100%" textAlign="left"/>
     </mx:HBox>
 </mx:Component>
 <mx:DataGrid left="10" right="10" top="70" bottom="10" id="myGrid" fontSize="12"/>
 <mx:HBox left="10" right="10" top="10" bottom="518">
  <mx:Form width="100%">
   <mx:FormItem label="컬럼수">
    <mx:HSlider id="chgColumn" width="236" minimum="5" maximum="10" snapInterval="1" enabled="true" change="onChangeColumn()"/>
   </mx:FormItem>
  </mx:Form>
 </mx:HBox>
</mx:Application>

LabelRenderer.mxml

Grid HeaderText 값을 동적으로 사용하기 위해 headerText 사용하였습니다.

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
  horizontalAlign="left" verticalAlign="middle" horizontalScrollPolicy="off" creationComplete="initComp()">
     <mx:Script>
      <![CDATA[

   private var _headerText:String;
   
   public function set headerText(value:String):void {
    _headerText = value;
   }
   
   public function get headerText():String {
    return _headerText;
   }

       public function initComp():void {
        lvlLabel.text = _headerText;  
       }
        ]]>
     </mx:Script>
     <mx:Label text="" textIndent="3" width="100%" textAlign="left" id="lvlLabel"/>
</mx:HBox>


3. 참고

Posted by 나비:D
:

The following example shows the differences between a clustered, stacked, 100%, and overlaid Bar chart in Flex 3.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/10/11/creating-clustered-stacked-overlaid-and-100-bar-charts-in-flex-3/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:ApplicationControlBar dock="true">
        <mx:Form>
            <mx:FormItem label="type:">
                <mx:ComboBox id="comboBox">
                    <mx:dataProvider>
                        <mx:Object label="clustered" />
                        <mx:Object label="stacked" />
                        <mx:Object label="100%" />
                        <mx:Object label="overlaid" />
                    </mx:dataProvider>
                </mx:ComboBox>
            </mx:FormItem>
            <mx:FormItem label="showDataTips:">
                <mx:CheckBox id="checkBox1" />
            </mx:FormItem>
            <mx:FormItem label="showAllDataTips:">
                <mx:CheckBox id="checkBox2" />
            </mx:FormItem>
        </mx:Form>

        <mx:Spacer width="100%" />

        <mx:Legend dataProvider="{barChart}"/>
    </mx:ApplicationControlBar>

    <mx:BarChart id="barChart"
            type="{comboBox.selectedItem.label}"
            showDataTips="{checkBox1.selected}"
            showAllDataTips="{checkBox2.selected}"
            height="100%"
            width="100%">

        <mx:dataProvider>
            <mx:Array>
                <mx:Object name="R Winn" obp=".353" slg=".445" avg=".300" />
                <mx:Object name="P Feliz" obp=".290" slg=".418" avg=".253" />
                <mx:Object name="O Vizquel" obp=".305" slg=".316" avg=".246" />
                <mx:Object name="B Molina" obp=".298" slg=".433" avg=".276" />
                <mx:Object name="R Durham" obp=".295" slg=".343" avg=".218" />
            </mx:Array>
        </mx:dataProvider>

        <mx:verticalAxis>
            <mx:CategoryAxis categoryField="name"/>
        </mx:verticalAxis>

        <mx:series>
            <mx:BarSeries yField="name" xField="obp" displayName="OBP"/>
            <mx:BarSeries yField="name" xField="slg" displayName="SLG"/>
            <mx:BarSeries yField="name" xField="avg" displayName="AVG"/>
        </mx:series>
    </mx:BarChart>

</mx:Application>

View source is enabled in the following example.

Posted by 나비:D
:

출처 : http://www.cflex.net/showFileDetails.cfm?ObjectID=415
May 12, 2006
- Filter a dataGrid with a comboBox
Dynamically load result values into a comboBox to be used to filter a dataGrid.

A common practice in Flex is to use a comboBox to filter the data that is displayed in a dataGrid.  In this tip, the goal is to display a dataGrid with data from an authors database table that has the following structure:

 


   
authorId : String;
authorName : String;
status : String;
 

In addition, the user will be allowed to select from a comboBox that contains the different author status values and cause the author data in the dataGrid to be filtered.  It is recommended that you cast the result from a server call to an arrayCollection and use the arrayCollection as the dataProvider for the dataGrid.  By doing this, you will see that it is easy to manipulate and filter the data that is displayed.  Getting the data is beyond the scope of this tip, but there are plenty of examples available on that topic. 

 

First, cast the result to an arrayCollection:

 

 

       import mx.utils.ArrayUtil;

       import mx.collections.ArrayCollection;

 

       // event.result contains the data from the authors search.      

 

       public var authorsArray : Array = mx.utils.ArrayUtil.toArray(event.result);

 

       // Use authorsDataProvider as the dataProvider for the dataGrid.

 

       [Bindable]

       public var authorsDataProvider : ArrayCollection = new ArrayCollection(authorsArray);

 

 

 
The mxml would look like this:

 


     
<mx:DataGrid id="dgAuthors"
                dataProvider="{ authorsDataProvider }"/>
Next, dynamically load the comboBox with the unique author status values that exist in the search result.  
In this case, the possible author status values in the database are "Active", "Inactive" and "Deleted". 
Before proceeding though, let’s review the use-case.  The user is presented with a data grid view of the result 
from an authors search.  After viewing the grid, the user may wish to filter the result to only show the "Active"
authors.  Sure, the "Active", "Inactive" and "Deleted" status values in the comboBox could be hard coded. 
But, in doing so, the program would have to be maintained when a new status value is added to the database. 
Also, the comboBox should only contain author status values that exist in the returned search result.  If the
search result includes only "Active" and "Inactive" authors, the comboBox should only contain those same
values (not “Deleted”).  If all of the possible author status values in the database were hard coded into the
comboBox, the user would be able to select the "Deleted" value, which in this case would display a blank
dataGrid. We don't want to confuse the user.
The following code dynamically loads the author status values into an array that is used as the dataProvider 
for the comboBox.
 
     // Use the authorsStatusArray as the dataProvider for the comboBox.

 
     [Bindable]
     public var authorsStatusArray : Array = populateAuthorsStatusArray(authorsArray);
     public function populateAuthorsStatusArray(authorsArray:Array):Array 
  {
             var statusArrayHashMap : Object = new Object();
            
var statusArray : Array = new Array;
             
 
           
var n:int = authorsArray.length;
             for (var i:int = 0; i < n; i++)
             {
                    if (statusArrayHashMap[authorsArray [i].status] == undefined)
                    {
                               statusArrayHashMap[authorsArray [i].status] = new Object();
                               statusArray.push(authorsArray [i].status);
                   }
             }




            statusArray.sort();
             statusArray.unshift("All");
 // The "All" value is used programmatically to un-filter (reset) the result in the dataGrid. 




return statusArray;
      }
 Finally, filter the results in the dataGrid based upon the author status value that is selected in the comboBox. 
 
       public function filterAuthorsGrid():void
       {      
               authorsDataProvider.filterFunction=authorsStatusFilter;
               authorsDataProvider.refresh();  
       } 
       public function authorsStatusFilter(item:Object):Boolean
       {
               if (cboAuthorsStatusFilter.selectedItem != "All")
               {
                       return item.status == cboAuthorsStatusFilter.selectedItem; 
               } else {
                        return true;
               }
       }
 
The mxml would look like this:

 


     
<mx:ComboBox id="cboAuthorsStatusFilter"
               dataProvider="{ authorsStatusArray }"
               change=" filterAuthorsGrid();"/>

 

That’s all there is to it!  Because the dataProvider for the dataGrid utilizes binding, the grid will display the filtered result automatically, when the user selects an author status value in the comboBox.  Please keep in mind, that this is just a tip and may contain some typos.  However, you should be able to grasp the concepts from the code.

 

Good Coding,

 

Tim Hoff

Posted by 나비:D
:
출처 : http://cafe.naver.com/flexcomponent/970

   //한건과 두건이상을 모두 처리하는 방법
    var acResult:ArrayCollection = event.result.data.row as ArrayCollection; //두건 이상일 경우만 ArrayCollection형성됨
    if (acResult == null) { //한건일 경우 (한건을 받았을 경우는 NULL이 생성됨.)
         acResult = new ArrayCollection(ArrayUtil.toArray(event.result.data.row));
    }
    acTagResultProc02 = acResult; //acTagResultProc02는 ArrayCollection으로 해당 DataGrid의 DataProvider와 Binding되어 있음.
Posted by 나비:D
:

출처 : http://blog.naver.com/mobil52/150006800535

http://www.adobe.com/support/flashplayer/downloads.html

Download the Windows Flash Player 9 ActiveX control content debugger (for IE) 를 다운받아서 설치한다.

Posted by 나비:D
:

BLOG main image
by 나비:D

공지사항

카테고리

분류 전체보기 (278)
Programming? (0)
---------------------------.. (0)
나비의삽질 (5)
Application (177)
C# (28)
JAVA (22)
ASP.NET (3)
C++ (19)
C (18)
.NET (0)
Visual Basic (12)
Flex (16)
Eclipse (8)
Delphi (16)
Visual Studio 2005 (5)
Embed (6)
Linux (2)
Mobile (1)
XML (1)
안드로이드 (2)
SQL (51)
Web (27)
etc. (14)
Omnia (0)
---------------------------.. (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

달력

«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Total :
Today : Yesterday :