Table with DropDownBox with data from child node

Hi,
I have following context:
Node Parent (0..n)
-- Node Child (0..n)
Child Attribute 1
Child Attribute 2
-- Parent Attribute 1
-- Parent Attribute 2
The parent node has a child node with cardinality 0..n. Now I created a table from the Parent node with several columns. In one column is a
DropDownBox that should display the data of the Child node, depending on the Parent node element.
Parent             |  Parent  DropDownBox           |
Parent 1                       | Parent 1 Child Attribute 1     |
Parent 1 Child Attribute 2     
Parent 2            | Parent 2 Child Attribute 1     |
Parent 2 Child Attribute 2     
How can I fill the child node with data depending on the parent node element? How is the mapping between both?
IParentElement parentElement;
IChildElement childElement;
while (rs.next()) {
   parentElement = wdContext.createParentElement();
   parentElement.setAttribute1(rs.getLong("ID"));
   parentElement.setAttribute2(rs.getString("SYSTEM"));
   wdContext.nodeParent().addElement(parentElement);
      while (rs2.next()){               
         childElement = wdContext.createChildElement();
         childElement.setAttribute1(rs2.getLong("ID"));
         childElement.setAttribute2(rs2.getString("NAME"));
         wdContext.nodeChild().addElement(childElement);
If the child node is non-singleton I have the following option
parentElement.nodeChild.addElement(childElement);
But this doesn't work for singleton nodes. How can I do something similar for singleton nodes?
Thanks for your help,
Andi

Not quite correct.
You can add more than one <b>element</b> to a singleton node (if cardinality is *:N).
But a singleton child node exists only once per parent <b>node </b>and not once per parent <b>element</b>.
That's an important difference.
Armin

Similar Messages

  • Solved af:table is not refreshed with updated MBean data from list even

    Hi,
    I have a af:table which gets its data from a Managed Bean List type varaiable.
    My table hav one lov as a row item.
    When i change the lov in each row... a new row should get added to the table.
    So in the value change listener of the selectOneChoice i added one element to the list.
    Enabled PPR on table.
    But table is not getting refreshed until i click on some button or link.
    Thanks
    Murali
    Message was edited by:
    Murali Chepuri

    Solved after adding partialtarget in ValueChangeListener.
    Thanks
    Murali

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • External Context Mapping - Pass data from Child to Parent

    Hello,
    I have the following scenario:
    DCParent Component (contains)
    - DCChildComp1    (used DC)
    - DCChildComp2    (used DC)
    - DCChildComp3    (used DC)
    - DCChildComp4    (used DC)
    What user enters in DCChildComp1 then needs to be made available to DCParent and all other DCChildComp(n) siblings.
    I have looked the posts and blogs in SDN and all of them seem to deal with passing inputField data from Parent to Child. May be I am missing it.
    In my case, I need the data to be passed from DCChildComp1 to DCParent ie Child to Parent. Then from DCParent to other DCChildComps.
    How should I go about
    a. defining the context nodes and Component Interface context nodes in parent vs child vs siblings and
    b. how should I map them externally?
    Step by step instruction would be helpful.
    Thanks in advance,
    SK.

    Thanks for all the help. As I had already seen all the links and blogs you had linked here, I was still confused about how it all came together. Finally, I got it after reading Bertram Ganz's response in this thread [Context Mapping problem;.
    when you map a context in the parent comp to an interface context in the used child component you do not define an external context mapping relation. That's normal context mapping as the data context resides in the child component.
    I have it working now and I am able to push the changes in the child component's context to the parent.
    For those who are interested in how I did it (and those who know a better way to do it
    In the child component DC:
    Map Child's View Context to Child's Controller Context
    Map Child's Controller Context to Child's Interface Controller (make sure the inputEnabled is FALSE - as the child is the data producer and the parent is the data consumer, in my case)
    In the parent DC:
    Add child DC as a Used DC
    Add child Component as a Used Component in the Parent Component
    Add Child's Interface Controller as Required Controller in Parent Component
    Map Child's Interface Controller Context to Parent's Controller Context
    Map Parent's Controller Context to Parent's View Context
    No external mapping required per the thread above. Now, any change in the child component's view is visible in the parent component view.
    Thanks again very much for the help.
    - Siva

  • How to pass a data from child window to parent window

    Hi,
    I have a jsp page with two hidden fields and a button, On clicking the button a popup will come out. There are two combobox in the popup and a search button. After putting a value in the comboboxes,if I click the search button, I need the datas of the combobox to pass to the parent's hidden fields then I need to do a data base search with that values of hidden fields and display the result in the parent page.
    I could I solve this problem, Please help, Its urgent.
    Thanks and Regards
    Rajib Sharma

    I think that you can use the JavaScipt as follow to pass a data from child window to parent window
    <HEAD>
    <script>
    function passData(){
    opener.form1.test1.value=form2.test2.value; //pass the value of test2 to the parent's test1
    window.close();
    </script>
    </HEAD>
    <BODY>
    <form name=form2>
    <input name=test2 type=text>
    <input type=button onclick="passData()" value=CLOSE>
    </form>
    </BODY>

  • Problem: Passing the business data from Child DC to Parent DC

    HI Dear All,
    I    developed two DC,s Parent and Child DC,i am able to pass the data from Parent DC to CHild DC,when i am trying to pass the data from Child DC to Parent DC i am unable to map the context attributes. Is it possible to pass the data from Child DC to Parent DC.
    Thanks in advance,

    What I wrote earlier:
    Yes you can acheive it by doing a flip. ie, in this case the present Parent DC will become Child DC and present Child DC will become Parent DC. Now you can share the context atrributes in reverse way (ie, you can access the context attributes of current Parent DC in current Child DC).
    Sorry Parameshwari. As Anand suggested, It will give an error called Cycle in component usage definitions, if you are doing the procedure what I suggested.
    In that case only you can do only one thing , you should maintain the requried context attribute in child DC and you can use it in parent DC.
    Child DC using Parent DC's context attribute is not possible.
    Regards,
    Jithin

  • How to copy data from one node to another or fromone table to another table

    Hi,
    I have a two tables.I am populating data in first table and on the click of first table ,selected row data should be copied to the second table.
    How do i achieve this requirement and what should be the cardinality of the second table
    Thanks
    Bala Duvvuri

    Hi,
    For this u have to fetch the selected row.
    For fetching the selected row go to the events of first table and select "OnLeadselect".
    Create a new method for this.
    Now in this method read the value of the selected row with method get_static_attributes.
    with this u will have the selected row in the element.
    not just bind this elemnt with the second table.
    Second node will also have the cardinality 0:n, because this is also binded with the table.
    Coding part for this is as below:
    method ONACTIONSELECT .
        DATA lo_nd_cn_mara TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_mara TYPE REF TO if_wd_context_element.
        DATA ls_cn_mara TYPE wd_this->element_cn_mara.
        DATA ls_cn_mara1 TYPE wd_this->elements_cn_mara.
      navigate from <CONTEXT> to <CN_MARA> via lead selection
        lo_nd_cn_mara = wd_context->get_child_node( name = wd_this->wdctx_cn_mara ).
      @TODO handle not set lead selection
        IF lo_nd_cn_mara IS INITIAL.
        ENDIF.
      get element via lead selection
        lo_el_cn_mara = lo_nd_cn_mara->get_element(  ).
      @TODO handle not set lead selection
        IF lo_el_cn_mara IS INITIAL.
        ENDIF.
      alternative access  via index
      lo_el_cn_mara = lo_nd_cn_mara->get_element( index = 1 ).
      @TODO handle non existant child
      IF lo_el_cn_mara IS INITIAL.
      ENDIF.
      get all declared attributes
        lo_el_cn_mara->get_static_attributes(
          IMPORTING
            static_attributes = ls_cn_mara ).       " here u are getting the selected row of the table.
    APPEND ls_cn_mara to ls_cn_mara1.      " append the row in the table so that can be binded with the second node
      DATA lo_nd_cn_maraout TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_maraout TYPE REF TO if_wd_context_element.
      DATA ls_cn_maraout TYPE wd_this->element_cn_maraout.
    navigate from <CONTEXT> to <CN_MARAOUT> via lead selection
      lo_nd_cn_maraout = wd_context->get_child_node( name = wd_this->wdctx_cn_maraout ).
    Bind the table with the second node
    lo_nd_cn_maraout->bind_table( ls_cn_mara1 ).
    endmethod.
    ->cn_mara  is the first node.
    ->cn_mara1  is the second node
    Thanks,
    Pankaj Aggarwal
    Edited by: Pankaj Aggarwal on Nov 19, 2008 7:40 AM

  • Problem with getting actual data from Detail in Master/Detail

    Hi.
    I'm using master-detail tables (based on Read-Only view objects connected with view link).
    In those tables some columns are inputText, so that user can change data for the use of stored procedure only (I don't want to change data showed in tables, just need a possibility to modify it before passing arguments to procedure)
    The problem is when I get data from rows from detail view (Read Only with attributes set to "updatable always") it's not the data user entered in the table (there is no problem in master table) but the data fetched from database.
    This is the way I do it in backing been:
    Row[] masterRows = view.getAllRowsInRange();
    for (int i = 0; i < masterRows .length; i++){
      MasterRowImpl row = (MasterRowImpl )masterRows;
    System.out.println("Group name:" + row.getGroup())
    RowIterator rowIterator = row.getDetailsView();
    while(rowIterator.hasNext()){
    DetailsViewRowImpl detailRow = (DetailsViewRowImpl )rowIterator.next();
    System.out.println("User name: " + detailRow.getName())
    So if (for example) in database I have Group1, with 3 detail rows: John1,John2,John3;
    and user in Tables displayedon page changes it like this:
    Group1_changed, John1, John2_blah, John333
    After executing the code above I get:
    Group name: Group1_changed
    User name: John1
    User name: John2
    User name: John3
    Is it a normal behaviour?
    ps. When I use entity based view objects there is no problem, but I want to use ReadOnly View Objects.

    this is my function that reads the data:
    while( ( ch = dis.read() ) != -1 ){
    mess.append((char)ch);
              licz++;
              if(licz>prog){
                   licz=0;
                   //gauge.setValue();
    when i use just mess.append(dis.readUTF()))
    i get en exception:
    java.io.EOFException
         at java.io.DataInputStream.readFully(+45)
         at java.io.DataInputStream.readUTF(+32)
         at java.io.DataInputStream.readUTF(+4)
         at KConnection.KConnector.connect(+137)
         at SerwisMain.download(+25)
         at SerwisMain.ok(+415)
         at KGUI.KInput.commandAction(+209)
         at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+152)
         at com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+459)

  • Need help with loading master data from R/3 to BI 7.0.

    Hi,
           First i thank everybody who took efforts to answer for my posting, i really am learning this new version with your helps. I really appreciate  it.
    Could any one help me with a step by step process to load master data from R/3 to BI 7.0. Please don't send help.sap.com.
    will assign points .
    With Thanks,
    Ranjani R

    Hi,
        Thanks for the answers. I tried loading it yesterday, i had lot of confusions.
      What should i do to load a master data from a R/3 to BI7.0.
    1. Created a Info object named (EKKO_mas) with some attributes (ernam, ekorg, lifnr).
    2. Go to info provider and right clicked on info area and selected insert char as data target. (Please correct if i am wrong).
    3. Login to R/3, go to sbiw generic data source created one with a view/table as EKKO and map the application compound and select the needed fields by checking the checkbox. (please correct if wrong).
    4. Go to source system tab and replicate data source. ( Please correct if i am wrong)
    Then what should i do.
    guessing steps:
    4. Create a Data source, in BI 7.0 . In that as i am not using flat file, should i select "application server" instead of "local workstation" . In field tab i specified all the fields given in Info object. ( Will there be anything else i should do or change in this tab)
    5. Load data in PSA. ( will the data from R/3 i selected loaded in PSA without any problem)
    6. Create transformation , save and activate.
    7. Create DTP save and activate , click execute.
    By doing the above given step will i be able to load the master data from R/3 to BI 7.0 data target (IO) .  Please help me if something is wrong with my steps.
    Thanks.
    RR.
    *will assign points.

  • Problems with displaying read data from a .lvm file

    Hi all.
    I aquire data with the PCMCIA card 6036E. I aquire online in Labview 7 and store the data in a .lvm file. When i try to display the same data i aquired before with the "read .lvm file" express vi, the waveform chart redraws itself after an undefined time, sometimes it redraws faster and sometimes it takes longer. WHY? i have only one header per aquisition and if i restart the aquisition a new file is written! I tried almost everything. Is this a bug from labview 7?
    I really appreciate your help.
    best regards,
    Bernd

    Hi Khalid,
    Here is a simplified version of my VI and also 2 .lvm files from the logged data. Sorry for the size, but I aquire with a sample rate of 20 kS/s and my main frequency is only 0.3 Hz. In the 6MB file I aquired a little more than 3 periods. When you run the VI with this file at the beginning it redraws very often and very fast, then after some time it draws about 1 period and then it redraws again and so on. I want that the hole data from this file is displayed at once. The 900kB file is aquired with 10kS/s and about 1.5 periods. This is the last size the displaying is working with. You think it is possible that the VI only works until 1MB? But my data usually is much bigger than that. I hope you can use the data because it is
    zipped, but otherwise it wouldnt be possible to post it.
    Thank you very much for your help, I really appreciate it!
    Best regards,
    Bernd
    Attachments:
    simplified_VI_for_offline_data_display.vi ‏79 KB
    2004-07-01_Messung9.zip ‏191 KB
    2004-07-01_Messung4.zip ‏680 KB

  • Help with migrating user data from one account to another

    I am on a G5 with 10.4.11. I installed FCP studio 6 and everything works fine except compressor. I have had only one user account on this mac (i will call it account 1). I was told to create another account (account 2), log on and see if compressor works. It does. Basically there are files missing on account 1 and compressor won't run. I have installed 3 times and no change.
    Anyway I was told to migrate all my user data from account 1 to account 2. I have been looking at threads and want to make sure I am doing the right thing. I found a way to close. Please see if this works. IT may be from the tiger forum:
    pick a short user name for your new account. then run the following terminal commands
    sudo mkdir /users/newshortname
    sudo ditto ~ /users/newshortname
    You'll have to enter your admin password (which you won't see) after the first command. that's normal. This will copy your current home directory to /users/newshortname. Then go to system preferences->accounts and create a new account with the short name newshortname. You'll get a popup saying that a home directory by that name already exists and asking if you want to use it. say yes.
    Anyway, I would like to migrate everything from account 1 to 2 and have all preferences...everything. I would also like to be able to delete the old account...account 1 and rename account 2. Since this is a home MAC, I really don't need it PW protected. I would like this MAC to just use my new account 2 at start up.
    Please ask me any questions. This is my editing MAC, and I can't get around inside the OS. I know FCP like the back of my hand, but don't want to screw up this computer.
    Thanks in advance.
    Message was edited by: Nelson May

    Yeah, you should be able to move most of it by changing permissions.
    Network settings could be any/all of these though for instance...
    /Users/YourUserName/Library/Preferences/ByHost/com.apple.networkConnect.<12 digit number>.plist
    /Users/YourUserName/Library/Preferences/com.apple.internetconnect.plist
    /Library/Preferences/SystemConfiguration/preferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
    /Library/Preferences/com.apple.sharing.firewall.plist
    /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    /Library/Preferences/com.apple.networkConfig.plist
    /Library/Preferences/SystemConfiguration/com.apple.nat.plist
    /Library/Preferences/com.apple.print.FaxPrefs.plist
    As well as the old Keychain & cookies from your Browser.

  • NEED HELP WITH TRANSFERRING P2 data from the HVX camera to FCP!!!

    Hey guys...
    Need some emergency help here... I'm trying to transfer my data from the P2 card on the HVX camera to my FCP6. I plugged in my 1394 firewire cable into the deck and followed the directions but the computer is not recognizing the HVX camera. PLEASE HELP!!!
    Jeremy

    They come with the camera on the Installer CD. OR....
    https://eww.pavc.panasonic.co.jp/pro-av/support/desk/e/download.htm#p2pcdriver
    http://panasonic.sixbullets.net/
    Shane

  • Delivery is pulling items with different delivery dates from sales order

    hi all,
    i have a sales order with two line items with different delivery dates(eg 1st and 21st). material availability date for them is different. when i tried to create the delivery on 1st it is pulling the 2nd item whose delivery date is on 21st.
    where can i control this.
    thanks in advance
    harini

    Hi,
    let us take one example>materials A and B,
    A delivery date is 22.01.2008(maintained in schedule lines in SO)
    B delivery date is 30.01.2008(maintained in schedule lines in SO)
    now i want to deliver material A on 22.01.2008
    by default system will give you only material A in the item line
    material B will not be displaced in the second line item
    now i want to deliver material B on 30.01.2008
    by default system will show me material B in delivery line item
    if in case material A is not delivered then delivery will show you two line items
    i.e., Material A and B
    i think you have understood the difference
    regards,
    US

  • Synced new 4G with backed up data from previous iPhone, now have 3G.  Any clue??

    Lost 3G phone, purchased new 4G, synced up with laptop - have data now and a 3G phone.  Any clues?

    http://www.apple.com/iphone/specs.html
    GSM model: UMTS/HSDPA/HSUPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz)
    CDMA model: CDMA EV-DO Rev. A (800, 1900 MHz)

  • Problem with displaying the data from Database on swf file.

    Hi ,
      I am new to flash.Thanks in Advance Please help me....
    Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next  when we click on the button for the second time(or anytime) it is not going  and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
    my Code looks like this:
    submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
    function onCheck2(evnt:MouseEvent):void {
    var xmlLoader:URLLoader = new URLLoader();
        var xmlurl:String = "http://localhost:8888/xmlServlet";
        var xmlrequest:URLRequest = new URLRequest(xmlurl);
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
    xmlLoader.load(xmlrequest);
    function xmlcompleteHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        var succData:String=loader.data;
            var xmlData:XML = new XML();
            var xmlList:XMLList;
            xmlData = XML(loader.data);
            xmlList = xmlData.children();
            for (var i=0; i<xmlList.length(); i++) {
                for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
                        var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
                        var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
                        var point2:Point = new Point(x_coordinate,y_coordinate);
                        var circle:Sprite = new Sprite();
                        circle.graphics.beginFill(0x00ff00);
                        circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
    Thanks in Advance.......Please Help me..........
    its Urgent..........
    Thanks,
    Swarthi

    Checkout following line in your code
    var xmlurl:String = "http://localhost:8888/xmlServlet";
    now change it to
    var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
    I think you will get the point now

Maybe you are looking for

  • String objects with the same string pointing to the same place but?

    Hi, Here is a simple sample String str1 = "a"; String str2 = "a";I understand that in Java str1 and str2 pointing to the same place in memory and Java compiler wouldn't save the string "a" in two different places in memory. Am I right? If so, if the

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack. When the Query Criteria is add like SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email FROM counselors WHERE counselors.

  • How do I change the line spacing in DW CS5?

    My problem seemed so simple to start with. All I want to do is create a single line space in DW. When I press "Enter" at the end of a sentence I want DW to go the the next line and not start a new paragraph. I just want one line space not a double pa

  • Just Updated iTunes/Quicktime and it still won't open...

    Ok so I have Windows XP and I went to open iTunes a little bit ago and it told me that iTunes couldnt open because I had Quicktime 7.0 and i needed at least 7.1. So I downloaded a the newer version of iTunes and Quicktime 7.1 or whatever and it still

  • In Table ctrl, based on i/p given in first col, populate data in other cols

    Hi All, Please help me in achieving the following requirement. In a table control, if a value is entered in the first column, all the remaining columns should be filled automatically with relevant data based on the input in the first column. The tabl