Inheritance in VO and binding in dataGrid (updated)

Hi All,
I'm new to flex and trying to learn a few concepts..
I'm new using Flex Builder 3 to develop a simple application that displays a Array collection in data grid....
I have a Value Object called Dept
package rxr.issuetracker.vo
import com.adobe.cairngorm.vo.IValueObject;
[RemoteClass(alias="com.Dept")]
public class DeptVO implements IValueObject
public var dept_id:Number;
public var dept_name:String;
Another VO is empVO which creates an instance of DeptVO
package rxr.issuetracker.vo
import com.adobe.cairngorm.vo.IValueObject;
[RemoteClass(alias="com.emp")]
public class empVO implements IValueObject
public var name:String;
public var edes:String;
public var dept_id:Number;
public var dp:DeptVO;
I'm trying to implement OOPS in flex...
I have an ArrayCollection, "arrData" in model class which is bindable...
package rxr.issuetracker.model
import com.adobe.cairngorm.model.ModelLocator;
import mx.collections.ArrayCollection;
import rxr.issuetracker.vo.*;
[Bindable]
public class testModel implements ModelLocator
private static var modelview:testModel;
public static function getInstance():testModel
if(modelview==null)
modelview=new testModel();
return modelview;
public function testModel()
if(modelview != null)
throw new Error("only one instance of model can be created");
public var arrData:ArrayCollection;
Now i retrieve value from database using spring services as back end..
I store the value in arrData and using Debug i see that the values are stored as follows:
model3.arrData
     [0]-rxr.issuetracker.vo.empVO
dept_id
edes
name
dp
dept_id
dept_name
now i bind this data to dataProvider as follows:
<mx:DataGrid id="data" dataProvider="{model3.arrData}">
     <mx:columns>
          <mx:DataGridColumn headerText="Column 1" dataField="edes"/>
          <mx:DataGridColumn headerText="Column 2" dataField="name"/>
          <mx:DataGridColumn headerText="Column 3" dataField="dp.dept_id"/>
     </mx:columns>
</mx:DataGrid>
here in the output, i get values for edes and name
but dp.dept_id remains blank...
how can i bind this inherited data to dataGrid ??
Message was edited by: sri2520ram

Hi Sriram,
Just simply replace the DataGrid column with the below one...No need to do any modifications...further..
<mx:DataGridColumn headerText="Column 3">
    <mx:itemRenderer>
     <mx:Component>
      <mx:Label text="{data.dp.dept_id}" />
     </mx:Component>
    </mx:itemRenderer>
   </mx:DataGridColumn>
Actually data is property of the itemrenderer(always available on itemRenderers) which is an object of your dataprovider...
Probably you dont have good knowledge on itemRenderers..May be you can got through the itemRenderers topic in Flex Docs. You will get an idea..
You can also check this link instead a very good article from Adobe on itemRenderers..
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html
Thanks,
Bhasker

Similar Messages

  • Problem with Bind Variable not updatable.

    Hi all,
    I'm using Jdev 11.1.2.3.0. In my VO, I created a Bind Variable and set it NOT UPDATABLE. Then I created a View Criteria with some other Bind Variables.
    I use this View Criteria in a search page, but at runtime I see also an inpunt text for the variable that is set NOT UPDATABLE and I can change its value.
    Of course if I try to change the value and I do the search, I get an error.
    This is the VO source:
    <Variable
    Name="UlssVar"
    Kind="where"
    Type="java.lang.String"
    IsUpdateable="false">
    <TransientExpression><![CDATA[adf.context.current.sessionScope.get('ulss')]]></TransientExpression>
    </Variable>
    Is it a ADF bug?
    Thank in advance.

    Hi,
    try selecting the bind variable and open the Property Inspector, under UI Hints, set the "Display Hint" to hide. This should hide it (No bug for this reason)
    Frank

  • Bind two DataGrids so that a change in one will be refelected in another

    Is there a simple way to bind two DataGrids so that a change in one will be refelected in another?  I have two DataGrids.  One will be editable and the other will be used to display the information from the editable DataGrid in a confirmation section.  Is there a simple example  out there for doing this?
    Thanks,
    Lee

    I may have figured it out.  It seems to be working with:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="initComponent()"
    xmlns:views="com.views.*"
    width="100%"
    height="100%">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    private var currentIndex:int=0;
    private function initComponent():void
    refreshList(null);
    public function refreshList(event:Event):void
    this.roArtist.getArtists();
    private function getArtists_result(event:ResultEvent):void
    dgArtistList.dataProvider=event.result as ArrayCollection;
    dgArtistList.selectedIndex=currentIndex;
    dgArtistListConfirm.dataProvider=event.result as ArrayCollection;
    dgArtistListConfirm.selectedIndex=currentIndex;
    ]]>
    </mx:Script>
    <mx:RemoteObject id="roArtist"
    showBusyCursor="true"
    destination="ColdFusion"
    source="art.src.cfc.artist">
    <mx:method name="getArtists"
       result="getArtists_result(event)">
    </mx:method>
    </mx:RemoteObject>
    <mx:Label x="10"
      y="10"
      text="Entry"
      fontWeight="bold"/>
    <mx:DataGrid id="dgArtistList"
    x="10"
    y="36"
    editable="true">
    <mx:columns>
    <mx:DataGridColumn dataField="ARTISTID"
       headerText="ArtistID"
       editable="false"/>
    <mx:DataGridColumn dataField="FIRSTNAME"
       headerText="First Name"
       editable="true"/>
    <mx:DataGridColumn dataField="LASTNAME"
       headerText="Last Name"
       editable="true"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Label x="10"
      y="210"
      text="Confirmation"
      fontWeight="bold"/>
    <mx:DataGrid id="dgArtistListConfirm"
    x="10"
    y="236" dataProvider="{ArrayCollection}">
    <mx:columns>
    <mx:DataGridColumn dataField="ARTISTID"
       headerText="ArtistID"/>
    <mx:DataGridColumn dataField="FIRSTNAME"
       headerText="First Name"/>
    <mx:DataGridColumn dataField="LASTNAME"
       headerText="Last Name"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    I need to do some testing.
    Thanks!

  • How to bind each DataGrid column separately?

    Good day fellow Flex developers!
    Could you please help me out. I am trying to figure out how to bind each DataGrid column separately. I need to bind each column to a separate bindable array variable. Is there a dataProvider property for each DataGridColumn???
    Thanks in advance,
    Eugene

    hopefully nope
    just imagine code complexity for that feature?
    how would you think should behave DataGrid when you'll populate your separate arrays with variable items number each?
    all you are able and should do is to build composite dataProvider source, join all your separate arrays into it, this is your responsibility.
    If you feel this message answers your question or helps, please mark it respectively

  • Binding to ViewModel , update UserControl from ViewModel

    Hi everyone,
    I'm making a simple application which displays a clock to the screen . I have those classes :
    - ClockDisplayer (UserControl)
    - ClockSetting (ViewModel - contains all settings of Clock and be displayed by ClockDisplayer)
    - ClockWindow (View - Contains ClockDisplayer and displays ClockSetting)
    - ClockSettingWindow (VIew - Helps user to edit ClockWindow's settings)
    In ClockSettingWindow, I use an ClockDisplayer to display a clock, and my DataContext is ClockSetting .
    My question is : How can I update information to ClockSettings and from ClockSetting to ClockDisplayer ?
    Here is my  Source Code
    Thank you

    If a view is going to be showing or updating some data in a viewmodel then you'd usually have that viewmodel presented to the view.
    If you have two viewmodels which need to change when you change some property then there are several alternatives.
    Perhaps the simplest approach is to have one as the private member of the other and change settings in that from the setter of the parent.
    I wouldn't usually have duplicated properties but maybe you have some reason for that.
    private int myVar;
    public int MyProperty
    get
    return myVar;
    set
    myVar = value;
    childObject.MyChildProperty = value;
    RaisePropertyChanged();
    private foo childObject;
    or you could have a public foo and bind directly to properties of that.
    You just use dot notation to do that
    <TextBox Text="{Binding ChildObject.Whatever}" />
    This is rather more elegant.
    Both have something of a price if you're using that instance of ClockSettings somewhere else since you need to pass in an instance of the thing or do some rather unpleasant static stuff.
    Usually, though, stuff like settings are displayed in a separate usercontrol and I would recommend that approach.
    Failing that.
    My preference would be to put the instance of ClockSettings in application.current.resources and you could bind to values using DynamicResource.  You would need to store an entry in there merged in app.xaml as the designer needs something there
    or it'll give you errors.  That can have default settings which are overridden at run time.
    Similar to this article:
    http://social.technet.microsoft.com/wiki/contents/articles/26200.wpf-dynamicresource-observablecollection.aspx
    You can add a reference to your assembly and declare a clocksettings in a resource dictionary, set it's properties in xaml there.  Merge that in app.xaml and you have a default bunch of settings.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    Canon 1DX support was added to ACR in version 6.7, 7.1.  An updated CS6 should be at level ACR 8.6.  If your ACR is not at level 8.6 try using CS6 menu Help>Updates.  If that does not install ACR 8.6 try downloading the ACR and DNG 8.6 converter and see if ACR 8.6 will install into your CS6.
    Adobe - Adobe Camera Raw and DNG Converter : For Windows
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh

  • I have a macbook pro, and am trying to update my software. I recently bought an iphone 5, and my software is to out of date to sync my phone with itunes. I currently am running 10.5.8 and I need to update to atleast 10.6.8. Just wondering if I need to pur

    I have a macbook pro, and am trying to update my software. I recently bought an iphone 5, and my software is to out of date to sync my phone with itunes. I currently am running 10.5.8 and I need to update to atleast 10.6.8. Just wondering if I need to purchase it from apple or if there is an easy/free way to update it.

    you need to purchase it: http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard.  It is only on a disk, not in download form.

  • What is difference between 10.5.6 COMBO Update and 10.5.6 Update ? Both say

    Both say +"The 10.5.6 Update is recommended for all users running Mac OS X Leopard and includes general operating system fixes that enhance the stability, compatibility and security of your Mac."+
    *Mac OS X 10.5.6 Combo Update* (669 MB)
    http://support.apple.com/downloads/MacOS_X_10_5_6_ComboUpdate
    *Mac OS X 10.5.6 Update* (373 MB)
    http://support.apple.com/downloads/MacOS_X_10_5_6Update
    I've never had any issue whatsoever before in using Software Update to handle all such OS updates. This is my first time encountering problem: It says "Restart", so I click Restart; and it starts on that purple default OS background, then starts an install process. But that status bar has been seemingly stopped for over 40 minutes after just advancing about 1/8th of an inch....
    So I forced power-off, restarted, found these forums, and one of many seemingly contradictory knowledge base documents says if you're having problems with automatic Software Update, then instead download a standalone installer.
    Which is why I ask the question of this thread. Normally, when I see "Combo Update", the implication is that there are multiple incremental updates stacked sequentially on top of each other, and the Combo will ensure that all intermediate updates get installed along with the most current update.
    But in this case, the information at the links above does not differentiate in any way WHICH of the two someone should use if their current OS version is 10.5.5 .

    That was really very helpful. So for me it begs a followup.
    I ran the "regular" installer since I had 10.5.5 prior to running the update. Via the automated Software Update feature, the update failed several times. However, when I came to the support forums here and then downloaded and ran the standalone update file (the regular one), the process was simple, and my system updated to 10.5.6.
    I have checked my system profiler and it says 10.5.6 ...
    But based on things you have said, it seems to me that I would be adding an extra layer of solid foundation for my installed OS X if I were to run the COMBO Updater now -- even though I am at 10.5.6 -- so as to ensure the thorough code set is in place.
    Am I reading correctly? Is that what you would recommend? Because I already earlier downloaded the COMBO update installer file, at the same time I also downloaded the smaller standalone updater file... At that time I wasn't certain which I should run. And I'd much rather take a little extra time now to run the COMBO if it would enhance the stability of the OS on my computer.
    So I look forward to your reply.
    In a separate posting I made tonight, in another thread, I am annoyed that for a major OS update Apple didn't entrust their consumer marketing division to write the instructions for consumers... so that instead of just that regular ol' automated convenience of set-n-forget "Software Update", in this case it actually communicated to the customer: "You might want to update Safari and iTunes using this automated process, but we also are updating the full operating system of OS X. And thus we recommend you download that file separately and run it from your desktop as follows...."
    Apple Support has historically never been in sync with the Consumer Sales side of the business -- the group that is Best in Class in knowing how to communicate with mainstream consumers.
    Thank you again for your reply. I wish the Support gods would take your posting and make it STICKY so that 1000 new threads don't have to be started. But that is like praying for competence from U.S. Congress.

  • Dynamic sql and bind variables

    Hi,
    I have a stored procedure which filters a table on 5 five columns. The filters come from the input parameters,
    and these 5 parameters can come in any combination, I mean some of them may be null and some of them may not be null.
    So I constructed the where filter of the query with IF blocks like the following:
    dynamic_query := 'select * from TESTTABLE where 1= 1';
    IF (P1 is not null) THEN
    dynamic_query := dynamic_query || ' AND column1 = :1';
    END IF;
    IF (P2 is not null) THEN
    dynamic_query := dynamic_query || ' AND column2 = :2';
    END IF;
    IF (P3 is not null) THEN
    dynamic_query := dynamic_query || ' AND column3 = :3';
    END IF;
    IF (P4 is not null) THEN
    dynamic_query := dynamic_query || ' AND column4 = :4';
    END IF;
    IF (P5 is not null) THEN
    dynamic_query := dynamic_query || ' AND column5 = :5';
    END IF;
    OPEN CUR_OUT FOR dynamic_query USING P1, P2, P3, P4, P5;
    The problem is how can I construct the USING and bind parameters, I cannot use "USING P1, P2, P3, P4, P5" because some of bind variables
    may not be in dynamic query if the input parameters are null. Is there a way to overcome this problem without writing all the 2 ^ 5 combinations?
    Any help is greatly appreciated.

    here it is in the Tomer Cohen way:
    IF (P1 is not null) THEN
    dynamic_query := dynamic_query || ' AND column1 = :1';
    ELSE
    dynamic_query := dynamic_query || ' AND  :1 IS NULL';
    END IF;
    IF (P2 is not null) THEN
    dynamic_query := dynamic_query || ' AND column2 = :2';
    ELSE
    dynamic_query := dynamic_query || ' AND  :2 IS NULL';
    END IF;
    IF (P3 is not null) THEN
    dynamic_query := dynamic_query || ' AND column3 = :3';
    ELSE
    dynamic_query := dynamic_query || ' AND  :3 IS NULL';
    END IF;
    IF (P4 is not null) THEN
    dynamic_query := dynamic_query || ' AND column4 = :4';
    ELSE
    dynamic_query := dynamic_query || ' AND  :4 IS NULL';
    END IF;
    IF (P5 is not null) THEN
    dynamic_query := dynamic_query || ' AND column5 = :5';
    ELSE
    dynamic_query := dynamic_query || ' AND -1 = :5';
    END IF;
    OPEN CUR_OUT FOR dynamic_query USING P1, P2, P3, P4, P5;Amiel Davis

  • HT1911 I just verified my Apple user ID and password but certain updates won't download (gives me the signal that I'm incorrect).  I keep changing it, verifying but not all applications let me proceed.

    I just verified my Apple user ID and password but certain updates won't download (gives me the signal that I'm incorrect).  I keep changing it, verifying but not all applications let me proceed.  So I can't download itunes software updates or update my iphone even though I have just verified my info.  I know others that have this problem but can't get support to resolve it.

    Hi mpellichero,
    Thanks for visiting Apple Support Communities.
    The steps in this article can help if you are being asked for the password to your previous Apple ID:
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/TS5223
    Best Regards,
    Jeremy

  • Get back the Data mart status in ODS and activate the delta update.

    I got a problem when deleting the requests in ODS.
    actually there is Cube(1st level. it gets loaded from an ODS(2nd level). this gets loaded from 3 ODS'S( 3rd level). we were willing to delete recents requests from all the data tardets and reload from PSA. but while delting in the request in ODS(2nd level), it has displayed a window, showing as follows.
    - the request 132185 already retrived by the data target BP4CLT612.
    -Delta update in BP4CLT612 must be deactivated before deleting the request.
    - Do you want to deactivate the delta update in data target BP4CLT612.
       I have clicked on execute changes in the window. it has removed the data mart status for all the request which i have not deleted.
    in the same it happened inthe 3 ODS's(3rd level).
    I got clear that if we load further data from source system. it will load all the records from starting.
    so to avoid this can any body help me how to reset the Data mart status and activate the delta update.

    Hi Satish,
    U have to make the requests RED in cube and back them out from cube,before u can go for request deletions from the base targets(from which cube gets data).
    Then u have to reset data mart status for the requests in your 'L2 ODS' before u can delete requests from ODS.
    Here I think u tried to delete without resetting data mart status which has upset the delta sequence.
    To correct this..
    To L2 ODS,do an init without data transfer from below 3 ODS's after removing init request from scheduler menu in init infopackage.
    Do similar from L2 ODS to Cube.
    then reconstruct the deleted request in ODS.It will not show the tick mark in ODS.Do delta load from ODS to Cube.
    see below thread..
    Urgentt !!! Help on reloading the data from the ODS to the Cube.
    cheers,
    Vishvesh

  • TS3694 MY IPhone will not let me back up or download the IOS 7 update because it says i do not have enough storage space. But I deleted all of my apps and pictures just to update it and it still wont let me do it. What should I do?

    MY IPhone will not let me back up my phone or download the IOS 7 update because it says i do not have enough storage space. But I deleted all of my apps and pictures just to update it and it still wont let me do it. What should I do?

    Contact iTunes to re-enable your account at expresslane.apple.com
    You can reach them by chat or email.

  • I tried downloading a free app and it asked for my billing information and when i entered it, it says that there was a billing problem with a previoud purchase and i have to update it. I keep updating it and it wont let me verify it and i cant get apps

    I tried downloading a free app and it asked for my billing information and when I entered it, it said that there was a billing problem with a previous purchase and I have to update it. I keep updating it and it wont let me verify it and I cant get any apps even if they are free, and I just Deleted some apps to make room for my new upate!

    The message says: "The payment method has been denied, try another method"
    I'm living in the same country and city since I was born, so I don't think the location is the problem.
    And yes, I paid with the card a meal in Burguer King today. And nothing more.

  • HT4972 I have ipad 1 . And i want to update it from ios 4.3.5 to ios 7 but i can't why ?? Please help me becouse i can't download apps from app store !!!!!   I would suggust:  1 to create a big camera for i pads and ipods and iphones so we can put it in a

    I have ipad 1 . And i want to update it from ios 4.3.5 to ios 7 but i can't why ?? Please help me becouse i can't download apps from app store !!!!!
    I would suggust:
    1 to create a big camera for i pads and ipods and iphones so we can put it in another ipad or ipod or iphone and it has a zoom lens
    2 when i downloaded photos and music from a computer to my ipad , i cant delete them now plese do the itunes like samsung becuz samsung have an easier way to download thing from computer
    I hope to help me with my poblome and fix it please !!??
    And i hope to take my suggusts and make me happy becouse apple it is cooler from samsung
    Apple the best
    H.M

    The iPad 1 can't run the newer operating systems. It'd be like trying to play a bluray disc in your 6 year old dvd player....it simply lacks the hardware to make the software run.
    No suggestion about the camera, but given that Apple's attitude seems to be to focus more on the more mobile devices for photography (the iPhone and Touch cameras got features, the iPad and mini didn't), that is highly unlikely. You can tell Apple what you want, but you'd probably be money ahead to get a digital camera.
    as to the photos, anything put on via iTunes has to come off via iTunes.Your main alternative would be to look for photo apps that offer file exchange that may give you more functionality.

  • TS1702 I have an Iphone 5  6.01.  I have a notice on my app store that I have an update. Tried to update, but it won't.  Connected to Itunes and tried to download update for App.  I can't do that either.  It won't let me update any of the apps.  What is w

    I have an Iphone 5  6.01.  I have a notice on my app store that I have an update. Tried to update, but it won't.  Connected to Itunes and tried to download update for App.  I can't do that either.  It won't let me update any of the apps.  What is wrong?

    My husband and I are using the same iTunes account on all mac & pc computers, but the libraries are different on each machine.  We always manually manage our music (no auto sync).  iTunes is up to date on the PCs.  My husband uses our joint iTunes account on his pc, but once again, has a different collection in his library from those on the other machines.  He can't load any music from his PC to his iphone 4.  I can load music from my mac library to my iphone 4s, but cannot load from my pc library to my iphone 4s.  How can I switch my main library that it syncs with from the mac to the pc?
    Thanks

Maybe you are looking for

  • Is it possible to start planning manager programatically from backend through PL/SQL?

    I need to activate and run Planning manager concurrent program from back end through PL/SQL.Actually i am working on MRP Open Forecast Interface and I want to run this program after inserting data in the interface table mrp_forecast_interface.Please

  • File and folder permissions for specific AD groups

    Having a special folder over multiple servers that certain user groups can access with specific permissions I'd like to audit the security mappings using get-acl commandlet. It's easy for a single folder but I would need subfolders and files too. I k

  • Is it possible to return the PO number after successful webadi upload

    Hi All, Kindly help me for the below scenario if possible. I am downloading approved requisitions through WebADi and then user is adding pay items in the excel of WebADI. Once upload i am submitting the custom concurrent program which indeed submits

  • Few questions about OWB migration 10g---- 11g and UIODs

    I am curretly migrating OWB repository from 10g to 11g. Both repositories are on the same database. We just have one single Project in our Repository. It is actually(preinstalled) MY_PROJECT renamed into something else. So it has the UOID of the "def

  • Package Names

    This is another of my questions related with naming. My problem is that I care so much on naming of packages, classes, methods, variables, etc because I want to make my code as readable as possible. I read from google about some standards when creati