Flex Grid Issues

Hi,
I am using Flex Grid in my project where i am successfully able to populate xml data dynamically. what i am doing here, I am dynamically generating the xml using httpservice. This HttpService is returning an XmlList that i am using to bind the grid dynamically.
Here i am not fixing the column header text and column width as  in future the number of cloumns can be increased so i can't fix the column header text and column width.
Here the issue is: how to remove " _x0020_"  from the header text and how to fix column width dynamically using Action Script.
For better idea please refer the screen shot as attached along with post.
Please have a look on the code as pasted below:
<?xml version="1.0" encoding="utf-8"?><mx:Canvas 
xmlns:mx="http://www.adobe.com/2006/mxml" width="862" height="580"><mx:TitleWindow 
x="182" y="113" width="670" height="395" layout="vertical" title="
Top Presenters" fontSize="12"horizontalAlign="
center" verticalAlign="top" showCloseButton="true" close="CloseGridWindow()" verticalScrollPolicy="
off" borderColor="#000000"horizontalScrollPolicy="
off" borderThicknessLeft="3"borderThicknessRight="
3" borderThicknessBottom="3" creationComplete="GetTopPresentersXMLData()" backgroundColor="
#FFFFFF" cornerRadius="
0" color="#FFFFFF" >
<mx:Script><![CDATA[
import mx.controls.dataGridClasses.DataGridColumn; 
import mx.collections.XMLListCollection; 
import mx.managers.PopUpManager; 
import mx.rpc.events.FaultEvent; 
import mx.rpc.events.ResultEvent; 
import mx.rpc.http.HTTPService; 
import mx.events.FlexEvent; 
import mx.controls.Alert; 
//funtion to get Top Presenters xml data 
private function GetTopPresentersXMLData():void{
var httpService:HTTPService = new HTTPService();httpService.url =
"http://ri/CItSL/Ters.aspx?mode=all&month=march&year=2009";httpService.resultFormat =
"e4x";httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
httpService.send();
Bindable] 
private var _xmlData:XMLList; 
//funtion to receive Http Service Response as XML Document  
private function onResultHttpService(e:ResultEvent):void{
var xmlData:XMLList = e.result.Table;myGrid.dataProvider = xmlData;
for each (var node:XML in xmlData[0].children()){
addDataGridColumn(node.name());
//function to add column dynamically  
private function addDataGridColumn(dataField:String):void{
//var spacePattern:RegExp=/_x0020_/g; 
//var andPattern:RegExp=/_x0026_/g; 
//dataField=dataField.replace(spacePattern," "); 
//dataField=dataField.replace(andPattern,"&"); 
var dgc:DataGridColumn=new DataGridColumn(dataField); 
var cols:Array=myGrid.columns;cols.push(dgc);
myGrid.columns=cols;
myGrid.validateNow();
//funtion to remove grid window 
private function CloseGridWindow():void{
PopUpManager.removePopUp(
this);}
]]>
</mx:Script>  
<mx:DataGrid id="myGrid" alternatingItemColors="[#A2F4EF, #EFDE7D]" x="0" y="0" sortableColumns="false" width="658" height="352" fontSize="10" verticalAlign="middle" editable="false" enabled="true" horizontalGridLineColor="#befcc4" color="#000000">  
</mx:DataGrid>
</mx:TitleWindow>
Please let me know, If anyone knows the solution.

Hi,
You can follow the below mentioned code and see if this works for you.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="onComplete();">
    <mx:Script>
        <![CDATA[
            // imports:
            import mx.events.FlexEvent;
            import mx.core.UIComponent;
            import mx.controls.dataGridClasses.DataGridColumn;
            import mx.controls.Text;
            import mx.utils.ObjectUtil;
            import mx.controls.Label;
            import mx.collections.ArrayCollection;
            // data provider:
            [Bindable] private var dp:ArrayCollection = new ArrayCollection();
            private function onComplete():void {
                // populate data provider here
                // to avoid calcMaxLengths execution when the app is created:
                dp = new ArrayCollection(
                        { col1: "Short", col2: "Other column 1" },
                        { col1: "Some long string", col2: "Other column 2" },
                        { col1: "Short", col2: "Other column 3" },
                        { col1: "Short", col2: "Other column 4" },
                        { col1: "The longest value in this column", col2: "Other column 5" },
                        { col1: "Short", col2: "Other column 6" },
                        { col1: "Short", col2: "Other column 7" }
            // this is going to be executed whenever the data provider changes:
            [Bindable("dataChange")]
            private function calcMaxLengths(input:ArrayCollection):ArrayCollection {
                // if there are items in the DP:
                if ( input.length > 0 ) {
                    // and no SPECIAL child exists:
                    if ( getChildByName("$someTempUICToRemoveAfterFinished") == null ) {
                        // create new SPECIAL child
                        // this is required to call measureText
                        // if you use custom data grid item renderer
                        // then create instance of it instead of UIComponent:
                        var uic:UIComponent = new UIComponent();
                        // do not show and do not mess with the sizes:
                        uic.includeInLayout = false;
                        uic.visible = false;
                        // name it to leverage get getChildByName method:
                        uic.name = "$someTempUICToRemoveAfterFinished";
                        // add event listener:
                        uic.addEventListener(FlexEvent.CREATION_COMPLETE, onTempUICCreated);
                        // add to parent:
                        addChild(uic);
                // return an input:
                return input;
            // called when SPECIAL child is created:
            private function onTempUICCreated(event:FlexEvent):void {
                // keep the ref to the SPECIAL child:
                var renderer:UIComponent = UIComponent(event.target);
                // output - this will contain max size for each column:
                var maxLengths:Object = {};
                // temp variables:
                var key:String = "";
                var i:int=0;
                // for each item in the DP:
                for ( i=0; i<dp.length; i++ ) {
                    var o:Object = dp.getItemAt(i);
                    // for each key in the DP row:
                    for ( key in o ) {
                        // if the output doesn't have current key yet create it and set to 0:
                        if ( !maxLengths.hasOwnProperty(key) ) {
                            maxLengths[key] = 0;
                        // check if it's simple object (may cause unexpected issues for Boolean):
                        if ( ObjectUtil.isSimple(o[key]) ) {
                            // measure the text:
                            var cellMetrics:TextLineMetrics = renderer.measureText(o[key]+"");
                            // and if the width is greater than longest found up to now:
                            if ( cellMetrics.width > maxLengths[key] ) {
                                // set it as the longest one:
                                maxLengths[key] = cellMetrics.width;
                // apply column sizes:
                for ( key in maxLengths ) {
                    for ( i=0; i<dg.columnCount; i++ ) {
                        // if the column actually exists:
                        if ( DataGridColumn(dg.columns[i]).dataField == key ) {
                            // set size + some constant margin
                            DataGridColumn(dg.columns[i]).width = Number(maxLengths[key]) + 12;
                // cleanup:
                removeChild(getChildByName("$someTempUICToRemoveAfterFinished"));
        ]]>
    </mx:Script>
    <mx:DataGrid id="dg" horizontalScrollPolicy="on" dataProvider="{calcMaxLengths(dp)}" width="400">
        <mx:columns>
            <mx:DataGridColumn dataField="col1" width="40" />
            <mx:DataGridColumn dataField="col2" width="100" />
        </mx:columns>
    </mx:DataGrid>
</mx:WindowedApplication>
Regards

Similar Messages

  • Flex Grid Overlapping the DojoDropDown

    I have a Jsp having Dojo drop downs & Flex object Embedded in it(Advanced dataGrid).
    When i open a drop down ....It is not shown properly , it opens under the Flex Grid...
    It happens only in IE7...
    What could be the issue & the solution for same?
    Thnx in advance

    I have a Jsp having Dojo drop downs & Flex object Embedded in it(Advanced dataGrid).
    When i open a drop down ....It is not shown properly , it opens under the Flex Grid...
    It happens only in IE7...
    What could be the issue & the solution for same?
    Thnx in advance

  • Flex Module issue with Panel

    Hello everyone. I have the following problem.
    In my application I have several modules and each of them have components CollapsableTitleWindow (extends Panel). After opening the window it is added to the container which is in the main application (CollapsableTitleWindowContainer). In these windows you can open another window (and so on).
    Now, what is the problem. When I change (reload) any module and I want to open a new window (sub window) with the already loaded window I get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.containers::Panel/layoutChrome()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\Panel.as:1405]
    at com::CollapsableTitleWindow/layoutChrome()[D:\Flex 3 Workspace\WesobCrm\src\com\CollapsableTitleWindow.as:216]
    at mx.core::Container/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2867] (...)
    Indicates that the main applications have object Panel
    Please help.
    P.S. I found a similar problem on http://www.nabble.com/Flex-Module-issue-with-Panel-td20168053.html
    ADDED: I extendes the Panel class and do something like that:
    override protected function layoutChrome(unscaledWidth:Number, unscaledHeight:Number):void
                    use namespace mx_internal;
                    if(!(mx_internal::titleBarBackground is TitleBackground)) {
                            mx_internal::titleBarBackground = new TitleBackground();
                    super.layoutChrome(unscaledWidth, unscaledHeight);                     
    But now i had something like that: Before After
    You can see that it loos style declaration.H

    Thanks for the anserw.
    I don't exacly understand all but i found a solution for my problem and it works.
    Could you tell me if this is ok ?
    I Add in my main app
    public function getProductWindow():ProductWindow {
        return new ProductWindow();
    And in the module i change
    From var productWindow:ProductWindow = new ProductWindow();
    To var productWindow:ProductWindow = Application.application.getProductWindow();

  • Need to add flex grid in livecycle form to generate dynamic PDF

    Hi,
    not sure this is the right fourm or not, but I require a way to add flex data grid in my livecycle form to generate PDF containing flex grid.
    I tried adding a flex swf in Flash Field in Live cycle but it is giving me
    Error #2032: Stream Error. URL: file://PDFMedia026281/g/framework4.6.0.23201.swf
    I am new to this environement so any help would be great.

    Hi,
    with Designer ES3 (formerly know as ADEP Designer) you can use Flash files within XFA forms.
    Check Niall O'Donovan's article.
    He has prepared a nice example of using flash charts which can be manipulated at runtime.
    http://www.assuredynamics.com/index.php/2011/10/whats-new-in-adep-designer/

  • Flex performance issues

    hi
    By using an mvc architecture ,is it possible to overcome Flex performance issues...???
    Thanks
    Saritha S

    Excuse me ? If you develop a large scale application, you had better use a MVC architectural framework (with or without dependency injection) and additional design patterns like the presentation model. Otherwise, you will end up with code complexity as you try to overcome the inevitable structural problems as the application grows and THIS will end up in performance degradation.
    -          Run the profiler to identify bottlenecks and memory leaks: number of instances of a given class, execution time of methods, memory usage … E.g item renderers
    -          How much data is loaded, processed and displayed at any one time can have a big impact on performance. Reduce the amount of data: paging via parameter to the service
    -          Reduce the layout complexity: remove containers so nestLevel <= 4
    -          Remove event listeners: addEventListener () calls with corresponding removeEventListener() calls (do not use addEventListener() with weak reference as it decreases performance)
    -          Deferred instantiation of UIComponents (e.g Viewstack children) aka lazy instantiation
    -          Garbage collection: check Grant Skinner’s checklist
    -          Interrupted execution of complex functions (especially when looping on a large data set): the function monitors its execution time and yields (returns) when the current call exceeds a given duration (usually, that of a frame at 24 fps, which is the default Flex framerate). It is called again on the next frame and so on and so forth until processing is complete. You can use callLater() for that.
    -          Lazy loading of data
    -          Use more efficient code. Favour re-use of existing code in the Flex framework rather than re-writing what exists. Favour simple solutions over complex ones when possible.
    -          UID getter/setter in DTOs for improved performance in sorting / filtering of Array Collections
    -          Too many data bindings decrease performance. Mainly use data binding to bind views to the presentation models. Use the ChangeWatcher class or direct assignment of values when possible.
    -          Limit the number of calls to setStyle(). Use style declarations in CSS when possible.

  • Flex List with data-grid issue any body can help me ......i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.......any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi
    Sir am using flex 4.0.1     SDKS 4.1.0....
    Still i cont fix this problem....i have the same prob in many mxml files .any alternate solution for my prob pls let me know...
    Thanks in Advance,
    senthil.

  • Flex Printing Issue

    Dear All,
    I have used the following code to print from flex Datagrid in
    Flex 1.5.
    public function doPrint():Void {
    var pj : PrintJob = new PrintJob();
    //Save the current vertical scroll position of the DataGrid
    control.
    var prev_vPosition:Number = dgReportFinal.vPosition;
    if(pj.start() != true) {
    delete pj;
    return;
    //Calculate the number of visible rows.
    var rowsPerPage:Number = Math.floor((dgReportFinal.height -
    dgReportFinal.rowHeight)/dgReportFinal.rowHeight);
    //Calculate the number of pages required to print all rows.
    var pages:Number =
    Math.ceil(dgReportFinal.dataProvider.length / rowsPerPage);
    //Scroll down each page of rows, then call addPage() once
    for each page.
    for (var i=0;i<pages;i++) {
    dgReportFinal.vPosition = i*rowsPerPage;
    pj.addPage(dgReportFinal);
    pj.send();
    delete pj;
    // Restore vertical scroll position.
    dgReportFinal.vPosition = prev_vPosition;
    My Issues are:
    1. I want content of the DataGrid to be printed, but the
    printing prints the content of the datagrid along with the
    scrollbars.
    This is the same, when I use landscape mode also.
    2. When the content of the Datagrid exceeds the width of the
    Datagrid (i.e., when we have a hscroll), those contents are not
    printed. I think only the content which we view currently is being
    printed.
    To print headers and footers which are the best controls to
    use. Bcoz my headers would look like:
    Date: Organization:
    Place: Branch:
    Report Title
    Thanks in advance.
    thanks and regards,
    Loganathan.P.C.

    The feature of printing data which is not visible in the
    control is not available in Flex 1.5 but is available in Flex 2
    (Beta). Work around can be fragmenting the data as pages for
    printing but involves splitting data in grid into a fixed number of
    rows for each page.
    I can also suggest a work around for you header and footer
    issue. you can create a sepearate Print Preview Page which can be
    invisible / visible as you wish and on click of print use the
    controls in that page and print
    tipically the Preview page can be like
    mx:Label ---> Header text
    mx
    ataGrid -- > data which is paged -
    mx:Label --- > footer

  • Populate Flex Grids during view state?

    Hi, I am very new to Flex. I am working on a Flex project where I want to populate xml data in the two grids during viewstate. In my project, I have two grid which resides in the two discinct view state named as "Category" and "Topic". For these two view state, i have two disctinct grids.
    I am successfully able to populate one grid that is "Category" state grid but when i change the state on button click event another grid does not populate with the data.
    Can anyone help me with this?
    Please have a look on the code below for better idea:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="730" height="492" creationComplete="TopCategoryTopic()" currentState="HotCategory">
    <mx:states>
      <mx:State name="HotTopic">
          <mx:SetEventHandler target="{btnHotTopics}" name="click" handlerFunction="TopCategoryTopic">     
          </mx:SetEventHandler>
      <mx:SetProperty target="{btnHotTopics}" name="label" value="Top &quot;Hot&quot; Topic"/>
      <mx:RemoveChild target="{categoryGrid}"/>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:DataGrid id="topicGrid" x="10" y="27" width="601" height="263" color="#000000">   
        </mx:DataGrid>
      </mx:AddChild>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:Label x="10" y="10" text="Top &quot;Hot&quot; Topic" width="150" color="#000000" fontWeight="bold" fontFamily="Verdana" fontSize="11" id="label0"/>
      </mx:AddChild>
      </mx:State>
      <mx:State name="HotCategory">
        <mx:SetEventHandler target="{btnHotCategories}" name="click" handlerFunction="TopCategoryTopic">     
          </mx:SetEventHandler>
          <mx:SetProperty target="{btnHotCategories}" name="label" value="Top &quot;Hot&quot; Categories"/>
      <mx:RemoveChild target="{categoryGrid}"/>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:DataGrid id="categoryGrid"  x="10" y="27" width="601" height="263" color="#000000">   
        </mx:DataGrid>
      </mx:AddChild>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:Label x="10" y="10" text="Top &quot;Hot&quot; Category" width="159" color="#000000" fontWeight="bold" fontFamily="Verdana" fontSize="11" id="label2"/>
      </mx:AddChild>
      </mx:State>
    </mx:states>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
      width="730" height="492" headerHeight="20"
          showCloseButton="true" borderColor="#000000"
      layout="absolute" fontSize="12" verticalScrollPolicy="off"
      horizontalScrollPolicy="off" title="Customer Success &amp; Strategy - Q4 Hot Topics/Categories"
      themeColor="#0E4463" horizontalCenter="0"
      verticalCenter="0" id="CSSTopPresenter" cornerRadius="0" alpha="1.0"
      backgroundColor="#FFFFFF" borderThickness="0" close="CloseWindow()"
      color="#FFFFFF" borderThicknessLeft="3" borderThicknessRight="3" borderThicknessBottom="3">
        <mx:Script>
            <![CDATA[
                import mx.controls.dataGridClasses.DataGridColumn;
          import mx.collections.XMLListCollection;
            import mx.managers.PopUpManager;
                import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.http.HTTPService;
      import mx.events.FlexEvent;
      import mx.controls.Alert;
      import flash.events.MouseEvent;
                [Bindable]
                private var _xmlData:XMLList;
                private function TopCategoryTopic():void
                    var httpService:HTTPService = new HTTPService();
                httpService.url = "http://ri/co.UI/CtSS/Rsources/Hgory.aspx?Month=January&Year=2009";
                httpService.resultFormat = "e4x";
        httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
        httpService.send();
                //funtion to receive Http Service Response as XML Document         
              private function onResultHttpService(e:ResultEvent):void
        //var xmlData:XMLList = e.result.CategoryTopic;
        var category:XMLList = e.result.categories;
        var topic:XMLList= e.result.topics;
        if(currentState=="HotCategory")
            categoryGrid.dataProvider = category;
            for each (var node:XML in category[0].children())
                addDataGridColumn1(node.name());
        else if(currentState=="HotTopic")
          topicGrid.dataProvider = topic;
          for each (var node1:XML in topic[0].children())
            addDataGridColumn2(node1.name());
        //function to add Categories column dynamically
      private function addDataGridColumn1(dataField:String):void
        var dgc:DataGridColumn=new DataGridColumn(dataField);
        var cols:Array=categoryGrid.columns;
        cols.push(dgc);
        categoryGrid.columns=cols;
        categoryGrid.validateNow(); 
                //function to add Topic column dynamically
      private function addDataGridColumn2(dataField:String):void
        var dgc:DataGridColumn=new DataGridColumn(dataField);
        var cols:Array=topicGrid.columns;
        cols.push(dgc);
        topicGrid.columns=cols;
        topicGrid.validateNow(); 
          //funtion to remove grid window
      private function CloseWindow():void
        PopUpManager.removePopUp(this);
        ]]>
        </mx:Script>
        <mx:Button id="btnHotCategories" label="Top &quot;Hot&quot; Categories" width="173" height="37" borderColor="#2673A9" cornerRadius="6" labelPlacement="left" color="#000000" click="currentState='HotCategory'" x="45" y="23" fillAlphas="[1.0, 1.0]" fillColors="[#4D8F8D, #CCD3DE]"/>
        <mx:Button id="btnHotTopics" label="Top &quot;Hot&quot; Topic"  width="172" height="38" cornerRadius="6" borderColor="#000000"  color="#000000" click="currentState='HotTopic'"  x="46" y="78" fillAlphas="[1.0, 1.0]" fillColors="[#4D8F8D, #CCD3DE]"/>
        <mx:Canvas width="621" height="302" borderStyle="solid" borderColor="#0092F9" y="155" x="46" cornerRadius="9"  alpha="0.61" backgroundColor="#0092f9" id="canvas1">
        </mx:Canvas> 
        <mx:Image x="294" y="0" width="373" height="147" source="assets/CategoryTopic.gif"/>
    </mx:TitleWindow>
    </mx:Canvas>
    Thanks in advance.
    Vivek Jain
    Software Engineer

    I simplified the problem to it's essence and came up with this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
        creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                public var lProvider:ArrayCollection;
                private function init():void
                    var la:Array = [{label: "Conference", checked: true},
                                    {label: "Tickets", checked: false}];
                    lProvider = new ArrayCollection(la);
            ]]>
        </mx:Script>
        <mx:List id="cList" width="200" dataProvider="{lProvider}" itemClick="lProvider.refresh()">
            <mx:itemRenderer>
                <mx:Component>
                    <mx:HBox width="100%">
                        <mx:CheckBox selected="{data.checked}" click="data.checked = event.target.selected"/>
                        <mx:Label text="{data.label}"/>
                    </mx:HBox>
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>
        <mx:VBox width="600">
            <mx:Panel title="Conference component" width="100%" height="200"
                    visible="{lProvider.getItemAt(0).checked}"
                    includeInLayout="{lProvider.getItemAt(0).checked}"/>
            <mx:Panel title="Ticket component" width="100%" height="200"
                    visible="{lProvider.getItemAt(1).checked}"
                    includeInLayout="{lProvider.getItemAt(1).checked}"/>
        </mx:VBox>
    </mx:Application>
    Does this help?
    Dany

  • Flex 3 Issues - case noise, heat, fan

    Just got the Flex 3 15.6" (i7, 1 TB HDD + 8 GB SSD), and I am noticing a few issues: 1) When I push down with a finger on the base underneath the hard drive area, it gives in and makes a clicking noise (the case, not the hard drive). Kind of annoying, especially since I hear it sometimes when I pick up the laptop depending on where I hold it.
    2) It runs rather hot. I feel the heat on my leg pretty quickly.
    3) The fan is often noticeable, staying on quite a bit and loud enough to hear (but not loud).

    I think it is defective. You need to apply for a guarantee or to open the case and check everything. But if you do it yourself, then maybe you can lose the guarantee.

  • Flex incompatibility issue with SDK 3.5.0.12683 and IE6

    Anyone have experience with issues for IE6 and Flex SDK 3.5.0.12683?
    As a secondary issue, does anyone know of a way to force a browser cache refresh?
    thanks
    Simon

    Add a random number as a parameter to the url.
    Something like:
    url = url + "?t=" + new Date().time;

  • Adobe Flex Performance iSSUE

    hI,
    I need to build UI using ADobe flex that will connect BPM system. I have concurrent 500 users. Is this is feasible to develop application(UI) using Flex for such kind of application.
    Thanks,
    Vikash

    Hello Victor,
    We are using Flex at Taleo for an application that can have much more than 1,000 concurrent users. You just need to make sure that your architecture can scale horizontally and vertically. Flex isn't the best here, we also do have performance issues. If speed is your primary target, I suggests you to go pure HTML (5) and Javascript (jQuery, Dojo, etc.)
    Good luck.
    Nicolas Boulet-Lavoie
    Développeur logiciel
    Software Developer
    T. 418.524.5665 x 1454
    F: 418.524.8899
    C. [email protected]
    Ce courriel et toute pièce jointe peuvent contenir des renseignements confidentiels, particuliers ou protégés pour l'usage exclusif du destinataire du message original. Toute révision, copie ou distribution du présent courriel (ou de toute pièce jointe) par autrui est formellement interdite. Si vous n'êtes pas le destinataire prévu, veuillez retourner immédiatement le courriel à l'expéditeur et effacer définitivement l'original, les copies et les pièces jointes.
    This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient named in the original email to which this message was attached. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please return this email to the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

  • ITS 6.20 PL18 - ALV Grid issues

    Hi,
    We are in the midst of testing the ITS 6.20 patch 18 with EP6 SP12 and we have run into some problems that were not evident with 6.10.
    First. With IAC PP_MY_REQUIREMENTS (Requirements Profile) and PP_MY_PROFILEMATCHUP (Profile Matchup), there is now a visible horizontal bar that goes across the whole window. It can be moved up and down. This is not there in 6.10.
    Second. With the new PZ31_EWT (Edit Qualifications) transaction, when you select a qualification on the left and it then appears on the right, the dropdown for the ALV grid does not stay droped down when clicked. You have to hold the mouse button, and then when you drag over top of the choice that you want, it doesn't select it, BUT, if you use your arrow keys on the keyboard, it changes the value.
    Third. With PV8I (Internal Training), when viewing the Booking Information in the bottom of the screen, the top line/header of the window is only 1/8 visible.
    Has anyone run into any of these problems before? Does patch 19 or 20 (when it comes out) solve any of these problems?
    Sorry for all the ranting!!
    Cheers,
    Kevin

    Hi Kevin,
    I tried to recreate these issues with patch 20.
    First. I was not able to get the screens in the test system but it sounds to me like a splitter sash that devides two areas.
    Second. The drop down listboxes work as expected with patch 20 and stay open.
    Third. I am unsure if I did the correct steps but the book information area in PV8I looks pretty good. The header was completely visible.
    Best regards,
    Klaus

  • Flex License Issue.....?

    HI All
            We are testing the application using qtp. When we are testing the application we are getting flex license error after recording 30 test cases..
                        I developed my application using sdk version 3.2.0 and i implemented license information in the pom.xml..  I Included the automated.swc related stuff also ..
               Can any one tell me as early as possible solution for this issue?
    Thanks
    Ram..

    Hi,
    The Flex 2 serial numbers do not unlock beta 3, however we
    did make sure that beta 3 would not timeout before we release the
    final version. This may be heresy from Adobe but if you purchased
    FB 2 in the last few days simply because of FB 3 you might consider
    returning it and waiting until the release so you don't have pay
    the upgrade fee (not that it's too bad). The Beta will last you
    until then. If however you did intend to use the charting
    components and want those unlocked for beta 3, keep your FB 2 and
    mail me offlist at mchotin AT adobe DOT com with your FB2 charting
    serial and I can help you out.
    Matt

  • Flex Automation issue

    Hi All,
    I am facing one issue reagrding flex automation.with the trial version of flex builder,is it possible to have all the classes related automation?
    when I am trying to use mx.aumation package lots of classes are missing.Can anybody guide me as to how to achieve this?
    Regards,
    Maruti

    May I know what you mean exactly by "Flash Builder Standard Version - 4.0 plugin" + Premium License.
    Have you entered Flash builder premium license key in the screen that asks for serial number? If so, it will be Flash Builder Premium version 4.0 and not Standard version any more.
    If so, automation should work without any issue.
    To check whether premium features are enabled for your version of Flash Builder, please open "Network Monitor" using Window > Show View and see if it is enabled.
    If it is disabled, it shows a message that premium license is required.
    Please confirm.
    Thanks,
    Deeptika

  • Data Grid - issues resizing width of columns and with data refresh and sort

    SQLDeveloper 1215 on Windows XP professional
    Database : various 9.2
    In the table data tab there are a few minor issues our developers have highlighted.
    1) There seems to be a minimum column width in the data display. This restricts flexibility in reviewing the data, esp. where the data length is less than the minimum column width.
    2) If a column is resized or the column order is changed and a refresh or a new filter is applied then the columns are restored to their original position and size making it frustrating to run more than one query via the GUI.
    3) There is no quick sort option by clicking on the column heading which would be useful.

    I am still seeing this minimum column width in SQL Developer production (v1467) and I haven't seen any other posts relating to this. I have seen this all of the grids that I have looked at, including all of the grid based sub-tabs for the Object tabs (ie Columns, Data, Indexes, Constraints, etc) and the SQL Worksheet results tab.
    It is very obvious with the Column Name and Data Type columns of the Table Columns tab - the Column Name column can be shrunk to truncate values but the Data Type column can only be shrunk to about the twice the width of the widest value.
    Can anyone in development provide any comments about why we have this minimum width and how the minimum width is actually calculated?

Maybe you are looking for