Data Pagination in Flex

Dear all,
I want to paginate a large set of data (ArrayCollection) and
display it in DataGrid but I don't know how to do it with Flex.
I've read the documentation and it is written that is is possible
to paginate data for DataGrid, but unfortunately it doesn't explain
on how to do it. Could anyone help me giving hints on how to
paginate data in Flex?

quote:
Originally posted by:
Newsgroup User
"joshua.java" <[email protected]> wrote in
message
news:g7itdn$4ks$[email protected]..
> Dear all,
>
> I want to paginate a large set of data (ArrayCollection)
and display it in
> DataGrid but I don't know how to do it with Flex. I've
read the
> documentation
> and it is written that is is possible to paginate data
for DataGrid, but
> unfortunately it doesn't explain on how to do it. Could
anyone help me
> giving
> hints on how to paginate data in Flex?
http://gurufaction.blogspot.com/2007/02/flex-datagrid-paging-example-with.html
Thanks Amy,
I am going to try it out.
Many thanks

Similar Messages

  • How to show double byte data in a Flex application

    Hi
    I am looking for a way to show UTF-8 formatted data in a Flex
    application. I have a Java app in the backend that generates an xml
    file. Some attributes in the file are encoded in UTF-8 (when data
    is Japanese or Chinese...). My Flex app is showing box characters.
    I have XSLT app that generates html based off this xml file. The
    browser i showing the Japanese characters fine.
    I am wondering what the trick is to get Flex app show this
    data.
    Thanks
    Videoguy

    It turned out to be my XP that didn't have the the right lang
    sets installed. I have two PCs. On one everything showed up fine. I
    was able to view arabic, chinese data from xml just fine. On the
    other one, same swf didn't show them. There is MS knowledgebase
    article on how to enable east asian languages etc. I didn't give it
    a try. I am using other pc for my dev now.

  • Data push in flex

    Hi
    I am working on data push in flex!
    I am using consumer component in flex to subscribe to server to receive the data push by it!
    Data push is happening for sometime and when I switch to other browsers and come back consumer is not listening to the data sent by server but I can see the logs in the server. let me know any poitnters regarding this?
    Find the piece of code below...
    <mx:Consumer 
    id="cameraControlConsumer" destination="deviceDataFeeder" message="messageHandlerForCameraControl(event)" fault="faultHandler(event)"
    />
    private  
    function faultHandler(event:MessageFaultEvent):void{
    Alert.show(event.message.faultString);
    private function messageHandlerForCameraControl(event:MessageEvent):void {  
    var msgSender:String = event.message.headers["USR_LOGIN_ID"].toString(); 
    if (msgSender == myModel.loginUserId.toString()) { tempObj =
    new ObjectMap(event.message.body as Object);tempMap = tempObj.getHashMap();
    if (null != tempMap) {  
    var tempVar:String = tempMap.getValue("vmsDeviceId"); 
    if(tempVar != null) {selectedCameraId = tempVar;
    else {selectedCameraId =
    null;}
    if (1 != getStatus(selectedCameraId)&& selectedCameraId != null)  
    {disableCameraControl(
    false); tempVar = tempMap.getValue(
    "MdviZoomMax"); 
    if(tempVar != null){
    maximumZoom = int(tempVar);
    tempVar = tempMap.getValue(
    "MdviZoomMin"); 
    if(tempVar != null){
    minimumZoom = int(tempVar);
    else {disableCameraControl(
    true);}
    Thanks and Regards
    Aruna.S.N.

    Hi
    Yes the the most bugging problem, took lot of time to debug this.
    check web.xml file in your server, need to set session time out property as below
      <!-- Set timeout to 120 minutes -->
            <session-config>
                    <session-timeout>120</session-timeout>
            </session-config>
    Set '-1' for session to be continuous...
    Thanks and Regards
    Aruna.S.N

  • "advanced data grid"  with flex builder 3.0

    I'm getting watermark as "Flex Data Visualization
    Trial" when tried to use advances data grid with flex builder 3.0. There are some links floating on the internet where it's suggested that the license key should be provided in the flex-config.xml to avoid this issue. I would like to know if this componenet is stable with flex builder 3.0 and is it ok to use this in production environment?

    Someone from Adobe might be able to answer more definitely
    but it's probably just not considered compatible with a modified
    Eclipse (at least, the installer). It may just be the installer
    blowing up when it shouldn't. I think Adobe doesn't want to support
    install configurations that they don't have setup and tested. I had
    a similar issue once and solved it by doing the following... not
    sure if it'll work, and it's more of a last resort:
    Setup a regular eclipse install - install the plugin there.
    Somehow, you'll have to keep track of all the files it adds, either
    using timestamps or some compare software. It should be a bunch of
    files and/or folders in the '/plugins' directory, and possibly a
    few others in '/configuration', maybe '/features'. Take all the new
    folders and any jar files etc, and drop them into the same folders
    in your special Eclipse version. Hopefully when you start it up
    you'll get the Flex functions...
    Of course, you could end up hosing your entire "NWDS"
    (whatever this is) install. So you probably want to test it out
    first!

  • AIS data feeds and Flex

    Has anyone done any Flex Apps that work with the Automatic
    Identification System (AIS) used in the maritime industry to track
    ships?
    I'm looking for data feeds, databases etc. either in the NMEA
    format or ideally something like XML, I'm interested in both pay
    and open sources.
    Anyone here know of any available sources?
    D.

    Thanks for the reply. Yes, I did compile all the Java and it
    works OK with a simple Java program. It just will not work in a
    Flex application.
    The java classes are:
    RRA:
    package blah.myPackage;
    import java.util.List;
    import java.util.Collection;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    class RRA extends AbstractAssembler
    public Collection fill( List fillParameters )
    RRS service = new RRS();
    return service.getSome();
    RRS:
    package blah.myPackage;
    import java.util.ArrayList;
    import java.util.List;
    import java.sql.*;
    import flex.EORS.*;
    class RRS
    public List getSome()
    ArrayList list = new ArrayList();
    String str = "bob";
    RR rr = new RR(str);
    list.add(rr);
    return list;
    RR:
    package blah.myPackage;
    class RR
    private String name;
    public RR() { }
    public RR(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setName(String name)
    this.name = name;
    I started with something that retrieved data from a database
    but watered it down just to try and get some kind of communication
    between Flex and Java.

  • How To Populate An Advanced Data Grid In Flex With An XML Document Created In JAVA

    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="856" height="698" initialize="onInitData()">
        <mx:RemoteObject destination="utilityUCFlexRO" id="utilityUCFlexRO">
            <mx:method name="updateStationDetails" result="handleUpdateStationDetailsResult(event)" fault="handleUpdateStationDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:RemoteObject id="uniqueIdMasterUCFlexRO" destination="uniqueIdMasterUCFlexRO">
            <mx:method name="readByCustomerName" result="handleReadByCustomerNameResult(event)" fault="handleReadByCustomerNameFault(event)"/>
            <mx:method name="getCustomerAcDetails" result="handlegetCustomerAcDetailsResult(event)" fault="handlegetCustomerAcDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:Script>
            <![CDATA[
                import mx.events.ListEvent;
                import mx.collections.ItemResponder;
                import com.citizen.cbs.model.UniqueIdMaster;
                import mx.managers.PopUpManager;
                import mx.controls.ProgressBarMode;
                import mx.effects.Fade;
                import mx.controls.ProgressBar;
                import com.citizen.cbs.CitizenApplication;
                import mx.core.Application;
                import mx.messaging.messages.ErrorMessage;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                private var moduleCloseFlag:Boolean=false;
                private var v:UniqueIdMaster;
                [Bindable]
                private var customerDetails:ArrayCollection;
                [Bindable]
                private var branch:int=0;
                [Bindable]
                private var XMLDocument:XML;
                [Bindable]
                private var acDetails:XMLList;
                private var _progBar:ProgressBar = new ProgressBar();
                private function showLoading(e:Event = null):void
                    _progBar.width = 200;
                    _progBar.indeterminate = true;
                    _progBar.labelPlacement = 'center';
                    _progBar.setStyle("removedEffect", Fade);
                    _progBar.setStyle("addedEffect", Fade);
                    _progBar.setStyle("color", 0xFFFFFF);
                    _progBar.setStyle("borderColor", 0x000000);
                    _progBar.setStyle("barColor", 0x6699cc);
                    _progBar.label = "Please wait.......";
                    _progBar.mode = ProgressBarMode.MANUAL;
                    PopUpManager.addPopUp(_progBar,this,true);
                    PopUpManager.centerPopUp(_progBar);
                    _progBar.setProgress(0, 0);
                private function onInitData():void
                    utilityUCFlexRO.updateStationDetails(CitizenApplication.menuParameters["modulecode"]);
                private function handleUpdateStationDetailsResult(event:ResultEvent):void
                    if(moduleCloseFlag==true)
                        Application.application.unloadModule();
                private function handleUpdateStationDetailsFault(event:FaultEvent):void
                    var errorMessage:ErrorMessage = event.message as ErrorMessage;
                    Alert.show(errorMessage.rootCause.message);
                private function onSearch():void
                    if(txtName.text=="" || txtName.text==null)
                        Alert.show("Enter a name for search");
                        return;
                    if((txtName.text).length < 4)
                        Alert.show("Search should contain more than 3 alphabets");
                        return;
                    var d:String = txtName.text;
                    branch = CitizenApplication.initInfo.registeredUser.branchDetails.bdBranchNo;
                    uniqueIdMasterUCFlexRO.readByCustomerName(d,branch);
                    showLoading();
                private function handleReadByCustomerNameResult(event:ResultEvent):void                //In handle if record does not exists, dsiplays error message and resets the field
                    customerDetails =ArrayCollection(event.result);
                    PopUpManager.removePopUp(_progBar);
                    if(customerDetails.length==0)
                        Alert.show("Record Not Found, Enter Proper Name ");
                        onReset();
                private function handleReadByCustomerNameFault(event:FaultEvent):void
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handleReadByCustomerNameFault");
                private function onReset():void
                    customerDetails=new ArrayCollection();
                    txtName.text="";
                private function onCancel():void
                    utilityUCFlexRO.updateStationDetails("MM0001");
                    moduleCloseFlag=true;
                private function btnBackClick():void
                    view1.selectedIndex=0;
                private function btnBackClick1():void
                    view1.selectedIndex=1;
                private function onItemClick( e:ListEvent ):void
                    if(dgCustDetails.selectedItem == null)
                        Alert.show("Select Proper Record");
                    else
                        lblId.text = e.itemRenderer.data.uimCustomerId;
                        lblName.text = e.itemRenderer.data.uimCustomerName;
                        var custId:int = Number(lblId.text);   
                        uniqueIdMasterUCFlexRO.getCustomerAcDetails(custId,branch);
                        showLoading();           
                private function handlegetCustomerAcDetailsResult(event:ResultEvent):void               
                    //XMLDocument = event.result as XML;
                    acDetails = new XMLList(event.result.menu);
                    //Alert.show("Name: "+event.result.@name);
                    PopUpManager.removePopUp(_progBar);
                    view1.selectedIndex=1;
                    //adg1.dataProvider=acDetails;
                private function handlegetCustomerAcDetailsFault(event:FaultEvent):void
                    PopUpManager.removePopUp(_progBar);
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handlegetCustomerAcDetailsFault");
            ]]>
        </mx:Script>
        <mx:ViewStack height="688" width="856" id="view1">
            <mx:Canvas>
                <mx:Panel x="51" y="25" width="754" height="550" layout="absolute" title="Customer Search Page">
                    <mx:HBox x="174" y="26" horizontalAlign="center" verticalAlign="middle">
                        <mx:Label text="Enter Name:"/>
                        <mx:TextInput id="txtName" width="228"/>
                        <mx:LinkButton label="Search" click="onSearch()"/>
                    </mx:HBox>
                    <mx:Label text="--" id="lblId" x="40" y="194"/>
                    <mx:Label text="--" id="lblName" x="40" y="226"/>
                    <mx:DataGrid dataProvider="{customerDetails}" id="dgCustDetails" allowMultipleSelection="false" editable="false"
                        showHeaders="true" draggableColumns="false" width="718" height="373" itemClick="onItemClick(event);" x="10" y="61">
                        <mx:columns>
                            <mx:DataGridColumn headerText="Customer Id" dataField="uimCustomerId" width="150"/>
                            <mx:DataGridColumn headerText="Customer Name" dataField="uimCustomerName"/>
                        </mx:columns>
                    </mx:DataGrid>
                    <mx:ControlBar>
                        <mx:Button label="CANCEL" click="onCancel()" width="80"/>
                        <mx:Button label="RESET" click="onReset()" width="80"/>
                    </mx:ControlBar>
                </mx:Panel>
            </mx:Canvas>
            <mx:Canvas>
                <mx:TitleWindow x="10" y="10" width="836" height="421" layout="absolute">
                    <mx:AdvancedDataGrid x="6.5" y="10" id="adg1" designViewDataType="tree" variableRowHeight="true" width="807" height="278" fontSize="14">
                        <mx:dataProvider>
                              <mx:HierarchicalData source="{acDetails}"/>
                        </mx:dataProvider>
                        <mx:groupedColumns>
                            <mx:AdvancedDataGridColumn headerText="Type Of A/c" dataField="@Name" width="150"/>
                            <mx:AdvancedDataGridColumn headerText="Details Of A/c"/>
                        </mx:groupedColumns>
                        <mx:rendererProviders>
                            <mx:AdvancedDataGridRendererProvider id="adgpr1" depth="2" columnIndex="1" renderer="AcDetails1" columnSpan="0"/>
                        </mx:rendererProviders>
                    </mx:AdvancedDataGrid>
                    <mx:ControlBar height="56" y="335">
                        <mx:Button label="BACK" width="80" click="btnBackClick()"/>
                        <mx:Spacer width="100%"/>
                        <mx:Button label="EXIT" click="onCancel()" width="80"/>
                    </mx:ControlBar>
                </mx:TitleWindow>
            </mx:Canvas>
        </mx:ViewStack>
    </mx:Module>
    XML File Generated In JAVA:
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
    <AcType Name="Savings">
    <SavingAcDetails AcName="Mr. MELROY BENT" AccountNo="4" ClearBalance="744.18" ProductID="SB" TotalBalance="744.18">
    <SavingMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="AnyOne Single Or Survivor"/>
    </SavingAcDetails>
    </AcType>
    <AcType Name="TermDeposit">
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="1731" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Either or Survivor"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="2287" ProductID="TD">
    <TDMoreAcDetails AcStatus="NEW" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="78" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    </AcType>
    </menu>
    Tried Alot Of Examples Online But In Vain....
    Need Help....
    Thanks In Advance....

    Please help me !!!! I have been stuck up with this issue for the past two days and I need to atleast figure out if this is possible or not in the first place.

  • How to put an image in a data grid in Flex Builder 2

    Hi All,
    I need to populate a data grid with some text data received
    from a web service and, in a particular column of the datagrid, I
    have to put an image depending of a specific data returned me by
    the web service.
    It seems that there is the possibility to add an image in
    data grid column with the cellRenderer properties, but this
    property is available only for ActionScript 3.
    I'm developing an application in Flex Builder 2 that run
    ActionScript 2 and cellRenderer properties is not available. Is it
    right?
    If no, I will can use this cellRenderer properties in my
    application. Please, can you show me an example?
    If yes, there is a way to insert an image in datagridcolumn
    with ActionScript 2?
    Thank you very much
    Regards

    Flex Builder 2 uses Actionscript 3.
    You will need to write a renderer for for this column.
    There are a lot of examples of datagrids with images in them.
    here is one from the livedocs
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html

  • How to get updated data automatically  on flex scroll screen

    i am showing invoices and corresponding articles in the invoice on flex scrolling screen.details of invoices i am storing in a xml object through java class. i want that whenever i create a invoice it should automatically appear on screen.what method i should implement to get new created invoices on scrolling screen.
    code for strucrute
    private function converToCollection( inData:XML ):ArrayCollection
    var tempArrCollection:ArrayCollection = new ArrayCollection([]);
    for(var i=0; i<inData.INVOICE.length(); i++)
    var objToAdd:Object = new Object();
    objToAdd.ID = inData.INVOICE[i].ID;
    objToAdd.NAME = inData.INVOICE[i].NAME;
    //added by Mitesh on 12-11
    objToAdd.DATE = inData.INVOICE[i].DATE;
    objToAdd.STATUS = inData.INVOICE[i].STATUS;
    objToAdd.LOCK = inData.INVOICE[i].LOCKED;
    objToAdd.LOCK_COLOR = inData.INVOICE[i].LOCKCOLOR;
    objToAdd.EXISTANCE = inData.INVOICE[i].EXISTANCE ;
    objToAdd.ARTICLES = null;
    if( inData.INVOICE[i].ARTICLE.length() )
    var articleArrColl:ArrayCollection = new ArrayCollection([]);
    var articleLen:uint = inData.INVOICE[i].ARTICLE.length();
    for( var k = 0; k<articleLen;k++)
    articleArrColl.addItem({DESC:inData.INVOICE[i].ARTICLE[k].DESC,CODE:inData.INVOICE[i].ARTI CLE[k].CODE, QUANTITY:inData.INVOICE[i].ARTICLE[k].QTY});
    objToAdd.ARTICLES = articleArrColl;
    tempArrCollection.addItem( objToAdd );
    return tempArrCollection;
    display part of invoices
    </mx:Script>
    <mx:Canvas id="articlesContainer" x="15" y="38" width="90%" />
    <mx:HBox horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:Button id="closeBtn"  styleName="closeButtonStyle" x="15" />
    <mx:Label  text="{xmlObj.ID}" id="invoiceId"  width="120" fontSize="15" color="#373EA1" fontWeight="bold" textAlign="right" fontFamily="ArialEmbedded"/>
    <mx:Label  text="{xmlObj.NAME+'(total articles - '+ArrayCollection(xmlObj.ARTICLES).length+' )'}" width="350" color="#1B1D6D" fontWeight="bold" fontSize="15" textAlign="left" fontFamily="ArialEmbedded"/>
    <mx:Label  text="{xmlObj.DATE}" id="invoiceDate"  width="300" fontSize="15" color="#373EA1" fontWeight="bold" textAlign="left" fontFamily="ArialEmbedded"/>
    <mx:Spacer width="100%" />
    <mx:Button id="printBtn" styleName="printButtonStyle"/>
    </mx:HBox>
    <mx:VBox id="printInvoiceBlock" width="100%" backgroundColor="#FFFFFF" visible="false">
    <mx:HBox horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#FFFFFF">
    <mx:Label  text="{xmlObj.ID}" id="printInvoiceId"  fontSize="8" color="#000000" fontWeight="bold" textAlign="right" fontFamily="Arial"/>
    <mx:Label  text="{xmlObj.NAME+'( total articles - '+ArrayCollection(xmlObj.ARTICLES).length+' )' }" color="#000000" fontWeight="bold" fontSize="7" textAlign="left" fontFamily="Arial"/>
    </mx:HBox>
    <mx:VBox id="printArticlesContainer" width="100%" backgroundColor="#FFFFFF"/>
    </mx:VBox>
    <!--<mx:Image id="paidImg" visible="true" x="30" y="38" width="30" source="@Embed(source='assets/skins.swf', symbol='paid')" height="14"/>-->
    </mx:Canvas>

    When you create your scroller, give it an ID (if you create it in MXML). If you create the scroller in
    AS, make sure that whatever MXLM component you want to add it to has an ID. And, I would also try to use Sparks containers whenever possible. In any event, after you have defined your Scroller, this will make it simple.
    1. Create a DataGroup.
    2. Set DataGroup.dataSource = An ArrayList that contains all your screens.
    3. Set Scroller.viewPort = dataSource
    4. Create a new method to add new invoices to the ArrayList that contains all your screens.
    Below is truncated code from where I do this same thing... I create the scroller in AS and use it with MXML components.
        public class FeedConfigVideoScroller
             * This is our actual list data.
            private var vidRendList:ArrayList = new ArrayList();
            // a variable to tell us to update or not.
            private var selectionChanged:Boolean = false;
            // a variable to hold ids of videos we're keeping
            private var ids:ArrayList;
            // an array list of items to be removed from this list.
            //before the item is added to the map, its label will be updated
            //and check box deselected.
            private var deselectedList:ArrayList = new ArrayList();
            private var addedScreens:Boolean = false;
            private var d:DataGroup;
            private var scroller:Scroller;
            private var feedID:int;
            public function FeedConfigVideoScroller(){
                d = new DataGroup();
                d.dataProvider = vidRendList;
                var vert:VerticalLayout = new VerticalLayout();
                vert.horizontalAlign = "left";
                d.layout = vert;
                d.width = 340;   
                d.height = 370;
                scroller = new Scroller();
                scroller.height = 370;
            public function getScroller():Scroller {
                scroller.viewport = d;
                return scroller;
            public function addFCVLayoutComp(vidLayout:FeedConfigVidLayout):void {
                vidRendList.addItem(vidLayout);
            public function setVidRendList(vidRendList:ArrayList):void {
                this.vidRendList = vidRendList;       

  • How to Conditionally enable a date segment in flex based on Prior segment

    i need to enable 'Retest Date' - Date segment, only if a prior segment 'Result' has a value 'Fail'.In case 'Result' is passed, the 'Retest Date' should not be enabled.
    Retest Date should allow all possible dates . These values dont come from any table.
    I can use :$FLEX$.Result or :$FLEX.Result_valueset in my where clause of table validated valueset if the datatype is varchar2 . For date type, I have always used validation type as 'None' .Where do i mention the :$FLEX$.Result and what should be the validation type?
    Any ideas about how to achieve the beahviour mentioned above?
    Many Thanks,
    Lal

    Hi,
    Here is the solution:
    http://livedocs.adobe.com/flex/3/html/help.html?content=08_Dates_and_times_3.html
    Best,

  • LiveCycle Data Services without Flex UI

    Is it possible to use LiveCycle Data Services as a backend without Flex/Flash as front end ( any other tech as front end Struts, JSP, JSF etc).
    Idea is to get advantage of features provided by Data Services with something other than Flash player as front end?
    Thanks
    YogLC

    Thanks Mete.
    If you can please elaborate your thoughts more it will be helpful to me to take certain decisions.
    If you can provide some reference or pointer or example on this specific topic that would be great too!
    Any Adobe personnel from LiveCycle Data Services Team pl. reply?
    Thanks again,
    YogLC

  • Include xml data file in Flex Library Project

    Hi all,
    i've got a Flex Library Project in which I include some
    assets, as css files and some xml data files too. They are located
    in my project root, under /assets/css and /assets/data. Once
    compiled, if I use my library in other projects, the css styles
    from the css under /assets/css apply, but the xml data files are
    not found.Both are checked in the Flex Library Build Path window of
    the project's properties.
    There's any reason why the xml files are not included? Or
    should I reference them in some other way... In my library project
    I'm doing: ' theHTTPService.url = "assets/data/data_file.xml" '
    thanks in advance,
    Marc

    Hi Greg, thanks for answering.
    Yes, that's what I'd like to know also... I mark it to be
    added to the library, but how can I be sure if it's in the final
    .swc? Are they browseable somehow?
    thanks,
    Marc

  • I am looking for a tutorial I had found a few days back on Tabular data display in Flex

    Hi,
        I picked up Flex programming a few days ago and I was learning about data grids and tabular display of data. I came across a tutorial with code samples that showed how to 1. display information in a tabular format.
    2. how to read that information from a xml
    3. how to show more information if a item in the tabular format is selected.
    the tutorial used gamers and their preferred games as tabular data items and once an item is clicked it showed the game publisher info and some detailed information as text. I am looking for this particular tutorial again and not able to find through google search
    Could you please help me discovering this article again?
    regards,
    Ram

    Found it.
    http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics

  • Populating a Forum froma  data grid in Flex

    I have a forum that I would like to pouplate to be able to edit the information in Flex (flash builder four). So how would I click on a row of data (from a datagrid) and have it populate the forum?

    Hi,
    Do you mean a Form? Try listening for the "gridClick" event on the DataGrid and looking at the "item" property of the event. This event dispatches when the user clicks on the DataGrid and item will be the data object from the row that the user clicks on. I've written up a simple example 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">
        <s:layout>
            <s:VerticalLayout gap="10" paddingTop="10" paddingRight="10" />
        </s:layout>
        <fx:Script>
            <![CDATA[
                import spark.events.GridEvent;
                protected function dataGrid_gridClickHandler(event:GridEvent):void
                    var item:Object = event.item;
                    if (item)
                        keyTI.text = item.key;
                        nameTI.text = item.name;
            ]]>
        </fx:Script>
        <s:DataGrid id="dataGrid" gridClick="dataGrid_gridClickHandler(event)">
            <s:ArrayCollection>
                <fx:Object key="1000" name="Abrasive" />
                <fx:Object key="1001" name="Brush"/>
                <fx:Object key="1002" name="Clamp"/>
                <fx:Object key="1003" name="Drill"/>
                <fx:Object key="1004" name="Epoxy"/>
                <fx:Object key="1005" name="File" />
                <fx:Object key="1006" name="Gouge"/>
                <fx:Object key="1007" name="Hook"/>
                <fx:Object key="1008" name="Ink" />
                <fx:Object key="1009" name="Jack" />            
            </s:ArrayCollection>
        </s:DataGrid>
        <s:Form>
            <s:FormItem label="key">
                <s:TextInput id="keyTI" />
            </s:FormItem>
            <s:FormItem label="name">
                <s:TextInput id="nameTI" />
            </s:FormItem>
        </s:Form>
    </s:Application>
    Of course, you'll have to write some code so that the you can edit the data and save it from the Form. Hope this helps.
    -Kevin

  • Invalid Bitmap Data error when Flex tries to play a Crossfade transition?

    Hi All,
    I've got a Grid like this in my Flex 4 app.  When the view that contains this Grid is visible, and the view is changed to another view, my application tries to play the Crossfade effect as the transition to the other view.  My transition is defined like this:
         <s:transitions>
              <s:Transition fromState="*" toState="*">
                   <s:Parallel>
                        <s:CrossFade duration="150" target="{this}" />
                   </s:Parallel>
              </s:Transition>
         </s:transitions>
    This applies the transition to any view.  There's only one effect in there at the moment but it's in a Parallel block since I've experimented with multiple transitions.
    Now, when I'm on a view where this Grid is visible, and I try to transition to another view, I get an "Invalid BitmapData" error.  HEre's the complete stack trace:
    ArgumentError: Error #2015: Invalid BitmapData.
         at flash.display::BitmapData/ctor()
         at flash.display::BitmapData()
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:99]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getRealBounds()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:135]
         at spark.utils::BitmapUtil$/getSnapshot()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\utils\BitmapUtil.as:63]
         at spark.effects::AnimateTransitionShader/getValueFromTarget()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\effects\AnimateTransitionShader.as:283]
         at mx.effects::Effect/http://www.adobe.com/2006/flex/mx/internal::captureValues()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Effect.as:1462]
         at mx.effects::CompositeEffect/http://www.adobe.com/2006/flex/mx/internal::captureValues()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\CompositeEffect.as:377]
         at mx.effects::CompositeEffect/captureStartValues()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\CompositeEffect.as:358]
         at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9778]
         at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9701]
         at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087]
         at main/previousButton_clickHandler()[C:\Data\dev\Flex\main\src\main.mxml:48]
         at main/__previousButton_click()[C:\Data\dev\Flex\main\src\main.mxml:241]
    Here's what the grid looks like.  I experimented with adding and removing controls from the grid, and eventually narrowed it down to a a VGroup I've got in the grid.  If I remove that VGroup (and all it's children), the transition plays fine.  Add it back in, and everything blows up again.  I tried using a VBox instead of a VGroup, but there was no change--same error.  I also tried getting rid of horizontalAlign="center", and again, no change.
    <mx:Grid id='membershipGrid' >
         <mx:GridRow>
              <mx:GridItem>
              </mx:GridItem>
              <mx:GridItem>
                   <s:Label text="One Year" fontWeight="bold"/>
              </mx:GridItem>
              <mx:GridItem>
                   <s:Label text="Two Year" fontWeight="bold"/>
              </mx:GridItem>
              <mx:GridItem>
                   <s:Label text="5 Year" fontWeight="bold"/>
              </mx:GridItem>
              <mx:GridItem>
                   <!-- Comment out this VGroup, and everything works fine -->
                   <s:VGroup horizontalAlign="center">
                        <s:Label text="Monthly Autorenew"  fontWeight="bold"/>
                        <s:Label text="Payment plan option is not available" fontStyle="italic" />
                        <s:Label text="for multiple year memberhips." fontStyle="italic" />
                   </s:VGroup>
              </mx:GridItem>
         </mx:GridRow>
         <mx:GridRow>
              <mx:GridItem>
                   <s:Label text="Standard Membership" />
              </mx:GridItem>
              <mx:GridItem>
                   <s:RadioButton id="standardOneYear" group="{membershipTypeSelection}"
                                     label="{pricing.getMembership(MembershipName.STANDARD_ONE_YEAR).currencyPrice}" />
              </mx:GridItem>
              <mx:GridItem>
                   <s:RadioButton id="standardTwoYear" group="{membershipTypeSelection}"
                                     label="{pricing.getMembership(MembershipName.STANDARD_TWO_YEAR).currencyPrice}" />
              </mx:GridItem>
              <mx:GridItem>
                   <s:RadioButton id="standardFiveYear" group="{membershipTypeSelection}"
                                     label="{pricing.getMembership(MembershipName.STANDARD_FIVE_YEAR).currencyPrice}" />
              </mx:GridItem>
              <mx:GridItem horizontalAlign="center">
                   <s:RadioButton id="monthlyAutorenew" group="{membershipTypeSelection}"
                                     label="{pricing.getMembership(MembershipName.MONTHLY_AUTORENEW).currencyPrice}" />
              </mx:GridItem>
         </mx:GridRow>
    </mx:Grid>
    So, what's going on?  How can I get this transition to work?  Thanks!

    Flex harUI wrote:
    Sometimes that can happen if something gets sized too small.
    Thanks for suggesting that.  It got me thinking about some other things, and I then realized that the Grid itself was in a container with TileLayout, and a requestedColumnCount of 5.  That was a mistake--I had initially been playing with the TileLayout for my "grid" but then switched to using an actual mx:Grid control, and should have gotten rid of the TileLayout with the requestedColumnCount of 5.
    I changed my layout object to an instance of VerticalLayout, and now the problem has gone away.
    My theory, based on your suggestion that something might be sized "too small," is that when I added enough controls to my Grid (which all appeared in tile 1), tiles 2 through 5 got "too small" and thus Invalid BitmapData errors were thrown when the transition tried to figure out what bitmaps to fade in/out.
    Sound reasonable?
    Now I just have to re-enable all the other controls that I disabled while trying to hunt down this problem, and hopefully the Invalid BitmapData error won't recur.
      -Josh

  • How to pull records only for particular date range in Flex frm SAP wd table

    Hi,
    Can anyone help me with databing for datefield.
    I am using two datefields in Flex for Start Date and End Date. When I click the Execute button, it should pull only the records for that date range from SAP wd table and display in my Flex datagrid.
    Thanks,
    Sri
    Edited by: rmsridevi on May 17, 2011 4:38 PM

    Hi,
    Your query has mistakes as well. I corrected them.
    Check this two different ways were in first you can define the period (month) you want and in second you have the option to select from the drop drown list :
    SELECT T0.DocNum, T0.DocDate, T0.CardName,T0.DocTotal,T1.whsCode
    FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE t0.docdate >= '2011.01.01' and t0.docdate <='2011.01.31'
    OR
    SELECT T0.DocNum,T0.DocDate,T0.CardName,T0.DocTotal,T1.whsCode
    FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE t0.docdate >= [%1] and t0.docdate <= [%2]
    Kind Regards,
    Jitin
    SAP Business One Forum Team

Maybe you are looking for