Help with displaying data in advanceddatagrid

Hi,
I am working on flex 4.5.0 with java 5 as back end using blazeds.
I've to display nested data in advanceddatagrid.
Complex Person -> Person
From the backend i am sending an ArrayList of ComplexPerson which consists of Person Object as well.
code snippet is as follows
ComplexPerson complexPerson = new ComplexPerson(person);
complexPerson.setUser(person.getUser());
complexPersonList.add(complexPerson);
return complexPersonList;
When i access the ArrayList on the Flex end I am able to print the number of elements in the ArrayList but when i try to print the elements within the ArrayList I get following error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at net.sf.gilead.pojo.actionscript::LightEntity/toString()[C:\eclipse\workspace\gilead\gilea d\trunk\adapter-actionscript\src\net\sf\gilead\pojo\actionscript\LightEntity.as:55].
So my question is
1. how do i set a parent-child relationship between ComplexPerson and Person Object. whether i should do it java by passing some property or is there any functionality available in flex.
2. I dont want to pass an XML from java to flex as i am using remote object.
Could anyone please suggest what is the best way to do this?
Thanks in advance.
Shuja.

Formated post here:
http://forum.java.sun.com/thread.jspa?threadID=641779

Similar Messages

  • Help with displaying Date from Unix seconds

    My program receives seconds taken from a Unix system and must display them on my GUI. I realize I have to convert seconds to milliseconds for the Date, plus I take into consideration the timezone.
    My problem is that everything works correctly for time zones from GMT -1:00 all the way to GMT -12:00, but GMT time and all the zones between GMT +1:00 to GMT +12:00 display the wrong time. It varies how many hours off it is.
    Does anyone have any suggestions? I have been searching for similar issues.
    here is my code:
    static public String SecToTimeOfDay(long sec)
       SimpleDateFormat  dateFormat  = new SimpleDateFormat("HH:mm:ss");
       long timeZone  = java.util.TimeZone.getDefault().getRawOffset();
       int milli = 1000;
       String date;
       if (timeZone < 0)
          timeZone = timeZone * -1;
       //convert to seconds to milliseconds
       date = dateFormat.format(new java.util.Date((sec * milli) + timeZone));
       return date;
    }

    That is not the right way to handle time zones. Try the following and see if you're still having problems.
    static public String SecToTimeOfDay(long sec){  
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
        dateFormat.setTimeZone(java.util.TimeZone.getDefault());
        int milli = 1000;
        date = dateFormat.format(new java.util.Date(sec * milli));
        return date;
    }

  • Problems with displaying data in Chart

    Hi, everyone
    I am stuck with displaying data in Chart. I set the minimum
    and maximum for LinearAxis of a LineChart, so the chart only
    display the data within this range. But sometimes I still need to
    keep the trend of all data even the data is out of range.
    eg, the range of verticalAxis is 0 -100 and I got data 70,
    120, 90. Neither I want to set the data 120 to 100 in order to keep
    the data point nor make the data 70 connected directly to data 90.
    All I want is to keep the shape, from 70 to 120, from 120 to 90,
    but 120 doesn't display in the chart.
    My another question is when I try to select an area of a
    chart to zoom in, how can I the get the exact area that I select to
    zoom,
    for example: I want to use exactly the result of the
    following line:
    ((firstMouseX - this.mouseX)/ this.dataRegion.width) *
    chart.dataProvider.length
    that is I don't want to use methods ceil or floor to get the
    approximate area.
    Excuse me, I got one question more. The weird things is my
    chart won't resize itself when I resize the VDividedBox or other
    containers. I set the width equals 100% wherever it needs to be.
    Just like the Flex sample - dashboard. If I open a small window at
    the very begining and then maximize the window, the chart still
    keep the small part of its container. I don't understand why.
    Sorry for too many questions.
    Hope someone can help me.
    Thanks in advance.

    Can I use the Interpolate to solve the first problem?
    But I have no idea about interpolate at all.
    Please help!

  • Help with display quality (LCD TV)

    I've hooked up my Mac mini to my Samsung 32" LCD TV via HDMI cable.
    The overall quality is just far from desireable and is taking away all of the fun from using this new mac.
    I set the resolution output to 720p, which is what the TV supports. So that's good.
    I played slightly with the Contrast and Brightness on the TV settings.
    But I must be missing something. Although the image is sharp, it's very difficult to read from 6ft away, pictures look terrible (seeing the same picture on a different computer and monitor is so much more revealing), and the display is bad for everything basically.
    Please help with any settings suggestions or perhaps a detailed guideline for my setup.
    I started to configure a color profile on the display settings but the results weren't that great and I reverted to default. Too many subtle changes. My colorblindness probably doesn't help.
    Thanks.

    Thanks for the response.
    It's the latest Mac Mini with 2.5ghz i5, AMD Radeon HD 6630M, and 8GB RAM.
    I am familiar with the "Just Scan" setting under picture size on the Samsung TV.
    I'll look for the digital noise reduction.
    Are there complete guides with recommended settings for different setups? Or maybe even general, that would help me here?
    Thanks.

  • Problem with displaying Date field in the table.

    Hi All,
    I am trying to display data into a table UI Element. 
    In that data, i have one DATE type field. While displaying data in DATE field, it will display like this "01.02.2009".
    Now my requirement is if i want to modify that DATE field, it will allow to modify "01.02.2009"  to "26.02.2009".
    But while modifying DATE field , I want to show the Calender of that month, in that i  have to select the another date.
    (Like normal Date UI Element will show that calender).
    Can anyone please help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    Hi,
          Go to the context attribute that was mapped to the DATE field of the table and change the perperty INPUT HELP MODE to  AUTOMATIC and it works.
    Regards,
    Manne.

  • Help with display settings needed urgently

    Graphics and icons that are supposed to be round appear oval. For instance the Safari and App icons on the dock appear very oval. Logos on websites I've visited before and I know are round appear oval.
    I've tried all display settings and nothing helps. I'm a designer and this is causing a major hinderance. Everything appears condenced / squashed sideways. I'd be very grateful if someone could help with this.
    I've just purchased the laptop. I have been using Mac for a few years and I've always selected the "stretched" option from the Display settings which sorted out the problem completely. A circle looked a proper circle. But in this version the option is not available.
    Badly hoping someone can help with this.
    Thanks.
    Version Details - OS X Lion 10.7.4

    It sounds like you have selected an incorrect resolution.  For starters, are you talking about your Air's display or an external display?  You haven't said which Air you have.  If you have an 11" model, make sure your display resolution is set to 1366x768.  If you have a 13" model, it should be set to 1440x900.  These are the proper resolutions for the built in displays.  Chosing anything other than the referenced "native" display resolutions will result in distortions or clarity problems. 

  • Help with display of numbers

    First of all I have to say the tutorials on this site are extremely helpful. My instructor wants all our java code written as Object Oriented and when I did a search on here for Object Oriented it totally helped out. Now I just need help with the display of numbers, my code works perfectly fine except that the number has wayyyyyyyyyyy to many decimal points after it. I only wanted two.
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              System.out.println ("The Mortgage Amount is:" +(Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( ))));
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

    I figured it out, the math is wrong I think but I got everything to display correctly
    import java.io.*;
    import java.text.*;
    import java.text.DecimalFormat;
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
         DecimalFormat money = new DecimalFormat("$0.00");
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              monthPymt = (Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( )));
              System.out.printf("The payment amount is:$%.2f", monthPymt);
              System.out.println();
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

  • Help with displaying image received from socket on Canvas

    Dear programmers
    I know that I'm pestering you lot for a lot of help but I just got one tiny problem which I just can't get over.
    I'm developing a remote desktop application which uses an applet as it's client and I need help in displaying the image.
    When a connection is made to the server, it continuously takes screenshots, converts them to jpg and then send them to the client applet via socket communication. I've got the the server doing this in a for(;;) loop and I've tested the communication and all seems to be working fine. However the applet is causing some issues such as displaying "loading applet" until I stop the server and then the 1st screenshot is displayed. Is there a way to modify the following code so that it displays the current image onto a canvas while the next image is being downloaded and then replace the original image with the one which has just been downloaded. All this needs to be done with as little flicker as possible.
    for(;;)
        filename = dis.readUTF();
        fileSize = dis.readInt();
        fileInBuffer = new byte[fileSize];
        dis.readFully(fileInBuffer, 0, fileSize-1);
        //Create an image from the byte array
        img = Toolkit.getDefaultToolkit().createImage(fileInBuffer);
        //Create a MyCanvas object and add the canvas to the applet
        canvas = new IRDPCanvas(img, this);
        canvas.addMouseListener(this);
        canvas.addKeyListener(this);
        add(canvas);
    }

    Anyone?

  • Need help with saving data and keeping table history for one BP

    Hi all
    I need help with this one ,
    Scenario:
    When adding a new vendor on the system the vendor is suppose to have a tax clearance certificate and it has an expiry date, so after the certificate has expired a new one is submitted by the vendor.
    So i need to know how to have SBO fullfil this requirement ?
    Hope it's clear .
    Thanks
    Bongani

    Hi
    I don't have a problem with the query that I know I've got to write , the problem is saving the tax clearance certificate and along side it , its the expiry date.
    I'm using South African localization.
    Thanks

  • Help with a Date variable

    I'm creating a jscript to automatically rename a file the current days date, but i can't figure out how to get it to put a zero in front of days/months that are single digits. Can anyone help me real quick? Heres the code i already have, pay no attention to the "dh" part, it has to be there:
    var todayFileName = "dh" +
    today.getFullYear() + "" +
    today.getMonth() + "" +
    (today.getDate()+1); + " " +

    This little javascript function should help.
    Note that it is only meant to work with valid dates. Putting in a -7 for the parameter will result in something not so nice :-)
    function twoDigitNo(no){
        return  (no < 10) ? "0" + no : no;
      }Cheers,
    evnafets

  • Help with display glith using JList

    Hi, first post so bit of background - I'm teaching Java at the moment, am fine with command line but am dabbling more with Swing, despite certain glitches I always get ( e.g. the 7-segment display last year) but anyway....
    I've been trying to develop a little app that picks random boxers for a computer game. My current problem is that i am trying to add custom boxers and then update the JList and repaint the frame. When I add a boxer i can see it adding to the list, however it is unreadable and displayed too small.
    Forgive any bad coding etiquettes - its very much a work in progress from a relatively poor programmer ;)
    theBoxers is a JPanel containing the JLists, aWindow is the JFrame, customButton is a button to add a custom fighter - this gets a name from a field, and a weight from a combo box, adds it to an array and then attempts to add it to an array, then re-generate the lists
    customButton.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                        addCustom(customCombo.getSelectedIndex(),addCustomName.getText());
                             System.out.println(customCombo.getSelectedIndex() + addCustomName.getText());
                             theBoxers.repaint();
                             aWindow.repaint();
    public void addCustom(int theWeight, String theName)
              switch(theWeight)
                   case 0:          featherCustoms[featherCustomsSize]=theName;
                                  featherFighters = new JList(featherCustoms);
                                  featherCustomsSize++;
                                  break;
                   case 1:          lightCustoms[lightCustomsSize]=theName;
                                  lightFighters = new JList(lightCustoms);
                                  lightCustomsSize++;
                                  break;
                   case 2:          welterCustoms[welterCustomsSize]=theName;
                                  welterFighters = new JList(welterCustoms);
                                  welterCustomsSize++;
                                  break;
                   case 3:          middleCustoms[middleCustomsSize]=theName;
                                  middleFighters = new JList(middleCustoms);
                                  middleCustomsSize++;
                                  break;
                   case 4:          lightHeavyCustoms[lightHeavyCustomsSize]=theName;
                                  lightHeavyFighters = new JList(lightHeavyCustoms);
                                  lightHeavyCustomsSize++;
                                  break;
                   case 5:          heavyCustoms[featherCustomsSize]=theName;
                                  heavyFighters = new JList(heavyCustoms);
                                  heavyCustomsSize++;
                                  break;
                   default:     System.out.println("Not Added");
                                  break;
         }

    Awww, its nice that DB has someone to comeback and carry on a discussion.....long after its over.
    The problem here seems to be your lack of understanding between what a teacher or what an 'instructor' is.
    From the way you speak, an instructor appears to be someone who is technically skilled in both coding and teaching Java as a programming language, designed for people who wish to code in Java.
    A Teacher is someone who must deliver a wide range of subject knowledge to a wide range of abilities, including those who were unable to pass High-School exams. They are responsible for pitching the subject at the correct level for the student, whilst also teaching towards passing the exam, and ultimately gaining a qualification.
    The computing course i am currently teaching does not require OOP, but as Java is the language i was taught at University, and is still often used in our University's, I chose it. I don't pretend to be the best programmer in the world. But I do know that I am teaching the pupils the correct basics, at a higher level than is probably required, to give them the right approach at university. also, this is whilst teaching a large amount of theory.
    Whether you agree, or disagree, matters not to me as I think you would be unfamilier with the specification I am currently teaching to, or what area's of study need to be taught. The exam board appears happy, as do past students who are now well into their university course, as did my marker when i achieved my degree.
    The code posted in the OP (as stated earlier) had nothing to do with displaying my coding abilities, nor did it display the technique's I use when teaching students. It was a small sample of a program which included a JList which was not displaying properly. I tried to include the whole code but it was too big, therefore it was cut down.
    It was a work in progress which i now have working. So now i can look at it again in terms of programming structure. It appears I have made a mistake asking for assistance on here, as instead I got a lecture, with very little insight on your part as to my situation or the nature of the problem/solution.
    At the end of the day, each to his/her own opinion. What I will say is that when someone requests help, positive feedback/criticism is well recieved along with instructions/guidance on how the problem can be solved. I feel that I received none of this on here, but this is what I will always provide to the students I teach.
    Not everyone is a full-time Java programmer or has the time to hit the highest expectations.

  • Help with calender dates

    Hello every one
    I have a table with calender dates and there is a indicator which says if it is a working day or an holiday. Is there a way I can write a procedure that will help me fill that indicator column based on the calender dates.
    My table looks something like this
    date indicator
    01/01/2011 Holiday
    01/02/2011 working day
    01/03/2011 working day
    12/31/2011 working day

    Good Friday or Easter Monday as a holiday I can't help you with that.
    here is easter both julian and gregarian
    WITH years AS (    SELECT 1989 + LEVEL yr
                         FROM DUAL
                   CONNECT BY LEVEL <= 30)
    SELECT TO_CHAR (TO_DATE (day || ' ' || month || ' ' || yr, 'DD MM YYYY'),
                    'DD MON YYYY')
              easter_day_julian,
           TO_CHAR (
              TO_DATE (day || ' ' || month || ' ' || yr, 'DD MM YYYY') + 13,
              'DD MON YYYY')
              easter_day_gregorian
      FROM (SELECT yr,
                   a,
                   b,
                   c,
                   d,
                   e,
                   FLOOR ( (d + e + 114) / 31) month,
                   MOD (d + e + 114, 31) + 1 day
              FROM (SELECT yr,
                           a,
                           b,
                           c,
                           d,
                           MOD ( ( (2 * a) + (4 * b) - d + 34), 7) e
                      FROM (SELECT yr,
                                   a,
                                   b,
                                   c,
                                   MOD ( (19 * c + 15), 30) d
                              FROM (SELECT yr,
                                           MOD (yr, 4) a,
                                           MOD (yr, 7) b,
                                           MOD (yr, 19) c
                                      FROM years))))Edited by: pollywog on Nov 24, 2010 2:06 PM

  • Issue with display data from infoset

    Dear Experts,
    When I am trying to display data from BI INFOSET in (Execute in background ctrl+F2)backend it is working fine but when in try to run the execution in forground (execute F8) then the system gets hang.. and time out. could any one has this kind of experience. if so kindly let me know do i need to implement any patch or  else which way i can do work to resolve this issue.
    Thanks in advance.
    Mannu

    Hi Krishna,
    I have tried as you have suggested ie. using Tcode RSISET for displaying data but still i have the same issue.
    Could any one post any additional suggestions to follow.
    Thanks in advance,
    Mannu

  • Need help with enhanced data source in Production system

    Hello Gurus,
    1.                  I enhanced a datasource in BW and populated the field using customer exit using CMOD function. In Dev system, i dont have much data, so I deleted the whole data and did full load.
    what shud I do in Production side, so that Delta wudnt be affected??since in production, we have millions of records, we wont do full load., what is the best way to populate the field in production after transporting the datasource to production without disturbing delta's, to reflect the new field for previous years data???
    2.  can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Thanks in advance.,
    Best Regards,
    Pavan

    Hi,
    Please see this
    1.
    see this thread
    populated the new field with historic data
    2. can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Its better not to use them in a single dimension  because one customer and take more than one material so if you have 100 customer and 1000 materials  this combination will generate a large number of records. Its always better to keep characteristic which are having 1:N relation ship in one dimensional in you  case customer and material will have an M:N type of relationship.which will result in slow performance.
    Regards,
    Ravi

  • Problem with displaying data's in a chart

    I have a main VI (Hovedprogram) and 5 VI's (Ferdigprogram temp tur , Ferdigprogram temp retur, Ferdigprogram nivå, Ferdigprogram temp i fyr and Ferdigprogram trykk)who starts when I start the main VI.
    I want to display data for last 15 seconds, last 24 hours, last week, last month and last year.
    The problem is that the graphs for last week, last month and last year do not display all the data's. I just got a dot where I started the program 28.April. The graphs shows the data's from 2.May
    Any suggestion how I can change my program to appear as described?
    Attachments:
    Hovedprogram.vi ‏748 KB

    And here is one of the 5 VI's
    Attachments:
    Ferdigprogram temp retur.vi ‏125 KB

Maybe you are looking for

  • Will Lightroom 5 work on Windows Vista Home Premium?

    I could not get the LR 5 Beta version to open on Windows Vista.  I kept getting a message that an error was encountered and the program was closing.  Will the new LR 5 version work?

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys; i have a query regarding the data type for fetcing records from multiple ODS tables. if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name. can any one help with some sugg

  • Backing up question again!!! (a bit different though)

    I managed to lock myself out of my previous windows installation, and couldnt get in (Password problems) so I reinstalled Windows on a new drive. I still have access to the old drives files, I just cannot boot to it, so I was unable to backup iTunes

  • Calls abandoned in queue

    Hello there, Please could anyone explain to me the difference between a call being abandoned from the router queue and from the TDM queue? Also, can anyone tell me how the TDM works? Please be kind to me an use simple language. This is the definition

  • Floating-point numbers: min value

    Hi, the number wrapper classes each define a MAX_VALUE and a MIN_VALUE constant. While the MIN_VALUE of non-floating point numbers are negative numbers, the MIN_VALUE of the floating point numbers are the smallest postive numbers. From the Javadoc: F