Binding 2 Models in the Same component controller

I'm using 2 Import Adaptive RFC Models. I want to bind both the models in the component controller of the same web dynpro component.
But when I try to do model binding for the second model, it does not allow me to do so. If I try to bind the same model in a different project, it happens perfectly and works fine. That means the model i.e. the BAPI is perfectly ok.
Can anyone please tell why is it not allowing to bind 2 models in the component controller of the same web dynpro component?

Hi Satyadev,
   If I undersatand your description properly, you have 2 models nodes in a webdynpro component, and you want to bind these two together. If this is the question, then, yes you cant do the bindings declaralatively, you have to do it dynamically...
Look at the code snippet below, it may help you...
Suppose ChildNode1 and ChildNode2 are the model node in the context of the component controller. Then you can map these two nodes dynamically....
wdContext.wdGetAPI().reset();
     IWDNodeInfo testNodeInfo1 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode1", IWDNode.LEAD_SELECTION).getNodeInfo();
     IWDNodeInfo testNodeInfo2 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode2", IWDNode.LEAD_SELECTION).getNodeInfo();
     testNodeInfo2.setMapping(testNodeInfo1, true);
     testNodeInfo2.addAttributesFromDataNode();
Hope this helps,
Please let me know if I have not understood your question properly...
Regards,
Vishnu Prasad Hegde

Similar Messages

  • Referenced and Referencing Component Usages Must Address the Same Component

    Hi,
    I have a main component MC and it has two used componenents - IBLC and IVAC (interfaces for model and visual compoenents).
    I get the actual model component name from a table and I instantiate it as follows:
    instantiate model component
    DATA: l_ref_model_usage TYPE REF TO if_wd_component_usage,
    l_my_initial_usage type ref to IF_WD_COMPONENT_USAGE.
    L_MY_INITIAL_USAGE = wd_this->wd_cpuse_iblc( ).
    l_ref_model_usage = L_MY_INITIAL_USAGE->CREATE_COMP_USAGE_OF_SAME_TYPE(
    NAME = Item_Modelcomp ).
    Components VC1 and VC2 etc implement IVAC.
    Since I want to use the same instance of Item_Modelcomp in VC1 and VC2, I use the set_model(and from that I call method enter_referencing_mode) method as follows in MC.
    l_ref_interfacecontroller->set_model( model_usage = l_ref_model_usage ).
    Now in set_model method in VC1, I am using Item_Modelcomp as used component and not IBLC because I want to use the Item_Modelcomp context, but it expects IBLC as the used component(even though Item_Modelcomp implements IBLC) and hence gives the error "Referenced and Referencing Component Usages Must Address the Same Component".
    Any solution for this issue?
    Thanks and Regards,
    Srini.

    Hi Srinivasa,
    >I thought model compoenents are the ideal way to share
    >context across different visual components.
    Yeah, we though the same in the beginning. Later on we learned that:
      - it's not worth having the overhead of another WD component in most cases since you need to call the business logic nonetheless
      - declaring nodes as public is like having public attributes at a class - which can be really bad thing
      - there are lots of side effects regarding one component affecting the other one indirectly by having both mapped to the same model component
    In general, using model components should be avoided. There might be rare cases, where it makes sense to use them, but mostly it's not worth the effort.
    Best regards,
    Thomas

  • How to use the same component in different applications

    Hi All,
    I need to use the same component in different applications. i.e In opportunity, Quotation & Promotion.
    The Search help view in the component PRD01QR should be used in all these components but with different search criteria.
    With help of the DO_determine_configuration, different view configurations are possible but Different search criteria is not possible.
    for Eg. search parameter without DDLB, F4 options in another components.
    How can I control the behavior of the search view in different applications with restricting the field properties?
    Is it possible to find out where and in which component these search_help_search component is used?

    Hi Harry,
    Is it possible to find out where and in which component these search_help_search component is used?
    ans: I am giving an Example for your question go through that u might get clear about this.
    Ex: BT115IT_SLSO  sales order component
    below screen they component usage using for populate the product search component.
    please let me know any help required .
    Regards,
    vishwa.

  • IOS device failed to get ip address on multiple wlan on the same anchor controller

    Dear Experts:
    in my implementation, we need 2 WLANs be served on the same anchor controller.
    WLAN1: wep/40bit, integration with NAC/OOB on anchor controller for guest wlan service.
    and guest account controlled by NACguest server.
    WLAN2: wep/40bit, no layer3 secuirty for temporary using.
    foreign controller: WiSM on v6.0.196.4 (also testing on 6.0.182.0)
    anchor controller: WLC4402 on v6.0.196.4
    on WLAN1:
    Windows7 client get ip address correctly.
    iOS (iPhone4 on 4.3.1/4.3.2, iPad2 on 4.3.1/4.3.2) can get ip address correctly on WLAN1.
    WLAN2, iOS device cannot get ip address.
    compare with debug message "debug clien mac" + "debug dhcp message enable"
    on both foreign and anchor controller.
    on foreign controller:
    PM state has changed from: DHCP_REQD (7) Change state to RUN (20) last state RUN (20)
    on anchor controller:
    PM state always stay on: DHCP_REQD (7) Change state to DHCP_REQD (7) last state DHCP_REQD (7)
    Enable/Disable DHCP Address Assignment Required is not work.
    Enable/Disable DHCP proxy is not work.
    Any hit this issue when get ip address failed in multiple WLANs on the same anchor controller?
    In attachment log file,
    DMZ.log: anchor controller on DMZ.
    S3p1.log: WiSM on v6.0.182.0
    S3p2.log: WiSM on v6.0.196.4
    client mac: 00:1f:3b:05:33:c1, Windows7 Client
    client mac: 58:55:ca:cf:d2:07, iPhone4 with 4.3.1,
    WLAN1 subnet: 10.61.246.0/23
    WLAN2 subnet: 10.61.248.0/23

    Hi, Nicolas:
    just checking the attachment for the run-config on foreign/anchor controller.
    DMZ_run.config  - anchor controller
    s3p1_run.config - WiSM on v6.0.182.0
    s3p2_run.config - WiSM on v6.0.196.4
    at this moment, we have disable the wlan 10 on foreign controller, and wlan 2 on foreign controller.
    Wilson...

  • Labview runs CANBus and DNP3 software model at the same time

    I have an ordinary computer which communicates with several DSPs (CANBus communiation) through Compact Rio. The physical connection is that the DSPs' CANBuses are connected together and connected into Compact Rio, then the Compact Rio is connected with a router through Ethernet, at the same time, the computer also connects with the Router through Ethernet. Based on this physical architecture, the computer can run CANBus software model on Labview to communiate with Compact Rio and DSPs.
    As I know, the communication between the computer and the Compact Rio is not real time, and the communication between Compact Rio and DSPs can be real time, can you tell me if I get the right point?
    Now we have another device named RTDS (communicate with outside through Enternet based on DNP3), and want to add RTDS into our system. I am not sure about the way to conduct the communiation. The main question is that we need to run Labview to communicate with DSPs through CANBus and RTDS through DNP3 at the same time, is that possible?
    I proposed two possible ways to conduct communication, bt not sure if it is possible.
    1. I proposed that I connect RTDS with the Router through Ethernet, and then the computer communicates with RTDS through the Router based on DNP3 and also keeps the communication with DSPs through Router, Compact Rio, CANBus and then DSPs. I am wondering if this kind of communication is available for Labview.
    2. The second possible way I proposed is that I connect the RTDS with Compat Rio (CRio keeps connecting with DSPs through CANBus) through Ethernet, and then the computer communicates with DSPs through Router, Compact Rio and CANBus, and the computer communicates with RTDS through Router, Compact Rio and Ethernet. Also, the computer needs to run Labview with CANBus sofeware model and DNP3 software model at the same time. I am also not sure if it is possible.
    The diagram of the communication system is shown in the attachments.
    Attachments:
    Commnucation system diagram.pdf ‏118 KB

    To use Mail from multiple devices, your Mail Server needs to be using IMAP protocol (iCloud Mail uses that).
    IMAP keeps the Master copies on the Server, not on the Mac the way most default POP Mail servers do.
    To keep one Master Calendar, accessible from all devices, you need a web-accessible place to keep the Master Calendar. iCloud can do that.
    ¿Do you see a trend developing here?

  • Need to access a context_node in an another view of the same component

    Hi experts,
    I need to access a context_node which is not in my view but it exist in an another view of the same component.
    The component is ICCMP_BP_DETAIL.
    i need the context_node "CUSTOMER" from the view Bupadetail to view Bupacreate. so that i can make those context_node Attributes available in the configuration screen.
    regards,
    chella.

    Hi Chella,
    You can access the context node from other view using the custom controler or getting a context node from view that you are and use the method get_parent(to get predecessor objet) or get_related_entity(to get sucessor object).
    I think the second way is easier.
    Use transaction GENIL_MODEL_BROWSER and GENIL_BOL_BROWSER to know in wich object you are and where you have to go!
    Best regards,
    Caíque Escaler

  • Difference in using the same component made in mxml or action-script

    Hi,
    I made a sample project to show a kind of bug in the SuperTabNavigator component of FlexLib
    In this sample you can see that using the same component (made in both mxml or action-script) can make a difference
    I'm just wondering why ?
    Thanks
    Here is what i've posted :
    What steps will reproduce the problem?
    1. Create a button to dynamically add new tab with icon on a SuperTabNavigator
    2. Click on this button to add new tabs
    What is the expected output?
    - The expected output is tabs added without abnormal behavior
    What do you see instead?
    - Every time a new tab is created the one who had the focus has its content
    (icon + label) moving from the top-left of the tab to its original position
    Please provide any additional information below.
    Configuration:
    - Flex Builder 3 in Eclipse
    - FlexLib 2.3
    Sample:
    (see attached file)
    There is two type of tab, one in action-script and one in mxml
    They both are equal
    - Adding a new action-script tab to SuperTabNavigator works fine
    - Adding the same tab but an mxml one doesn't
    - Adding a new action-script or mxml tab to TabNavigator works fine
    -> meanings that the issue comes with SuperTabNavigator
    - Adding a new mxml tab to both SuperTabNavigator and TabNavigator at the
    same time makes TabNavigator to get the same bad behavior
    Remarks:
    - Tried everything but i'm really stuck
    - Weirdly, removing the PopUpButton correct the issue
    - In the same way if you keep adding action-script tab it automatically scroll to the
    last tab. And if you do the same with mxml tab then it add the tab at the end and
    scroll to the first one.
    => what could be the difference between using action-script or mxml object ?

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • Add the same component in 2 different tabs

    I am trying to add the same component in two different tabs in a tabbed pane. When I add it (programaticaly) the first instance disappears. Is this at all possible. I dont want to clone the component first and then add it.
    Thank you

    In my appllication I have a tab (call it main tab) that includes many components, like a textfield and texteditorpane that form a command line tool, a list of connected clients (names) and several other components in the same tab. Now the user, can issue a command from the command line to open any component in a new tab, for example he might want to open the clients list in a separate tab, while still having an instance of the clients list in the main tab.
    Also when something is updated (for example a new name is added in the list) I want both instances to be updated at the same time (since there is actually one Jlist object there shouldn't be any additional code to do that).
    So far, when i am opening a new tab holding a component from the command line (the one i made), the same component disappears from the main tab.
    I ll try what was mentioned above.
    Edited by: FreshPrince1 on Apr 12, 2010 6:50 AM

  • Reading the Context Node in the same Component

    Dear Gurus,
    I have made enhancement to standard view and functionality is working fine.
    Now i need to read the different context node (Different view) from the same component.
    I try to do the way Webdynrpo read the context node  but here there is Wizard and i stucked :-(.
    Can you plz suggest or post small code to read context node.
    Regards.
    ****Poorna****

    Hi,
    If those two views are assinged to one viewset in runtime repositoty, you can read the secod view by following code:
    lv_viewname = me->get_viewarea_content( 'Upper' ).      " here(me =view1)                               
      IF lv_viewname IS NOT INITIAL.
        lr_viewctrl = me->get_subcontroller_by_viewname( lv_viewname ).
        IF lr_viewctrl IS BOUND.
    from here you can read the context nodes.
    Regards,
    S Reddy

  • JTappedPane with the Same component

    Hi,
    I know that itsn't possible to put the same component in different tabs of a JTabbedPane, but i must perform this for my application, let say that i have a componenet similar to a JTable on which i can't perform all controls , only to change it's data, and I must put the same object into JTappbedPane and when selecting a tab the componenent change it's data according to the selected tab.
    can any one help me to skip the JTabbedpane problem and implement this.
    thanks in advance.
    Regards,

    From what I can see, you want to have some similar features with the table component in all the tabs. What I think you can do is to create some static fields in the table component which you'll use to store information for the table. Then in each tab create a new instance of the table component, and pass in the required data to be displayed. The static fields will be shared between the table components. That way if you have to call some data retrieval method, you only have to call the it one of the table components to get all the data for the other instances.
    This will save you from having to listen to the tabs for which is selected and then change the table display.

  • Popup for view of the same component

    Hi,
    I want to display a view in a popup window, I know how to do it using interface view of an external component.
    But Is it possible to open a view of the same component in a popup window?
    Regards,
    Mauricio

    Hi,
    Create a window in you component, say MyPopUpWindow.
    In Runtime Repository, Attache the view of your component to this window.
    Now create a Component Usage , Say CUXyzPopUp , for your component as used component and use MyPopUpWindow in there. Always use F4 for attaching views, windows and attaching window to Component Usage.
    You are done !!
    Now use the usual code for creation of popup using this Component Usage.
    reuse_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'ZCOMP/MyPopupWindow'  "#EC NOTEXT
    iv_usage_name = 'CUMyPopup'                      "#EC NOTEXT
    iv_title = lv_title  ).
    Hope this helps.
    Thanks & Regards
    Suchita

  • SAP B1 UDO: Bind CFL to the same form UDO

    Hi,
    I have created an UDO which is bound to a master data user defined table. Now, I have created a form for that master data, where in a matrix, I need to add some of the entries from the same master table, sort of like a tree structure. I have created a CFL which I have bounded to the object type of "MyUDO". The code on after choose from list is given below.
    try
                            Matrix oMatrix_upsell = (Matrix)form.Items.Item("mtx_upsell").Specific;
                            DBDataSource oDBDataSource = (DBDataSource)form.DataSources.DBDataSources.Item("@PRODUPSELLS");
                            DataTable oDataTable = null;
                            oDataTable = oCFLEvent.SelectedObjects;
                                if (form.Mode == BoFormMode.fm_ADD_MODE | form.Mode == BoFormMode.fm_OK_MODE | form.Mode == BoFormMode.fm_UPDATE_MODE)
                                    if (pVal.Row == oMatrix_upsell.RowCount)
                                        oDBDataSource.SetValue("LineId", oDBDataSource.Size - 1, null);
                                        oDBDataSource.SetValue("U_SKU", oDBDataSource.Size - 1, null);
                                        //oDBDataSource.SetValue("U_CatId", oDBDataSource.Size - 1, null);
                                        oDBDataSource.InsertRecord(oDBDataSource.Size - 1);
                                string Query = null;
                                Query = "select Name, U_Web_Id from [@WITM] where U_SKU =N'" + System.Convert.ToString(oDataTable.GetValue("U_SKU", 0)) + "'";
    Recordset RSet = (Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                                RSet.DoQuery(Query);
                                oDBDataSource.SetValue("U_SKU", pVal.Row - 1, System.Convert.ToString(oDataTable.GetValue("U_SKU", 0)));
                                oDBDataSource.SetValue("U_Name", pVal.Row - 1, RSet.Fields.Item("Name").Value.ToString().Trim());
                                oDBDataSource.SetValue("U_WebId", pVal.Row - 1, RSet.Fields.Item("U_Web_Id").Value.ToString().Trim());
                                oMatrix_upsell.LoadFromDataSource();
                                oDBDataSource = null;
                        catch (Exception ex)
                            B1Connections.theAppl.SetStatusBarMessage(ex.ToString(), BoMessageTime.bmt_Medium, true);
    The problem is that, when I select an item in the matrix, the data of the other fields in the form gets loaded for the selected object from the CFL. Is there a way to create a cfl and bind it to the same table on which the form is operating?

    Hi Philip,
    in SFP When you develop a form you have the interface mapped/assigned to it right.
    So here you have the source fields on the left hand side (the output parameters of your interface) and the form context on the right hand side.
    So lets say your interface gives you several data where employee list (EMP_LIST) is a internal table.
    so now if you drag and drop this EMP_LIST from left to right.
    when you do it again it will have the name EMP_LIST_1 and so on.
    Now if you go to layout tab you will see the form design area, here if you go to data view on the left hand side, you can see all the fields available for your form. since you have the EMP_LIST of 3 instances you will see all 3 of them.
    So now on the form as required have the 3 tables in different pages or so as you like, do the data binding to the 3 different data instances.
    since the actual actual source of the 3 lists is still the same the data presented in thhese tables is also same nothing different.
    you can have your script to individual tables for presentation nothing changes (all is well).
    Now when it comes to matter of support on your developments, when a new developer carries your work, he can see the context and understand that its the same. no need to investigate any scripts or such.
    Hope this makes you clear,
    Cheers,
    Sai

  • When do I need to declare multiple usages of the same component

    I have a noddy WD4A component with a main view containing only ViewContainerUI elements. Each container has a sub-view embedded implementing some functionality I am playing with. One of these views implements a select option by using the WDR_SELECT_OPTIONS component. I have got this working. Then I decide to make a copy of the view in order to test some modifications. I embed this in a new ViewContainerUI element on the main view.
    So now I have 2 sub views implementing the same select option. When I run it, the 2nd select option appears in the first view as a duplicate. The only way I can fix this is by declaring a second usage (of WDR_SELECT_OPTIONS) in the component and using this in the copied view.
    So now I have 2 WDR_SELECT_OPTIONS component usages declared (with different names) so that my 2 views can coexist on the screen. Is this really necessary? Had it been the same view implementing both select options fair enough - but these are 2 different views.
    If the views were not displayed at the same time, could I have declared and used just 1 component usage?
    Peter

    I have still not succeeded in dynamically creating a 2nd select Option and getting it to display in a View Container (called VC_SOD). The code compiles and runs but the select option does not display. This is hopefully something I will never need to do in reality. Just an exercise.
    The code that is commented out is the original standard technique of using a select_option usage. There is probably more then 1 fundamental mistake in the code
    method WDDOMODIFYVIEW .
      DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.
      DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    create the used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
    Here we copy the usage just for the hell of it.
      DATA lr_component_usage type ref to if_wd_component_usage.
      L_REF_CMP_USAGE = L_REF_CMP_USAGE->CREATE_COMP_USAGE_OF_SAME_TYPE( name = 'SELECT_OPTIONS2' ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
    *call the interface controller method init_selection_screen to get the helper class
    WD_THIS->M_WD_SOD = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
      data L_INTF_CONTROLLER type ref to IWCI_WDR_SELECT_OPTIONS.
      L_INTF_CONTROLLER ?= L_REF_CMP_USAGE->GET_INTERFACE_CONTROLLER( ).
    data lo_view_controller type ref to if_wd_view_controller.
    data lo_view_usage TYPE REF TO if_wd_rr_view_usage.
    data lo_view_cnt_assignment TYPE REF TO if_wd_rr_view_cnt_assignment.
    data lo_view type ref to if_wd_view.
    lo_view_controller = wd_this->wd_get_api( ).
    lo_view_usage = view->get_view_usage( ).
    try and see what is going on
    data lo_view_container_assignments type WDRR_VCA_OBJECTS.
    lo_view_container_assignments = lo_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ).
    lo_view_cnt_assignment = lo_view_usage->create_view_cnt_assignment( name = 'VC_SOD' assigned_container = 'VC_SOD' ).
    try and see what is going on
    lo_view_container_assignments = lo_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ).
    init the select screen
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SOD->INIT_SELECTION_SCREEN( ).
      WD_THIS->M_HANDLER = L_INTF_CONTROLLER->INIT_SELECTION_SCREEN( ).
      WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
                                  I_DISPLAY_BTN_CANCEL  = ABAP_FALSE
                                  I_DISPLAY_BTN_CHECK   = ABAP_FALSE
                                  I_DISPLAY_BTN_RESET   = ABAP_FALSE
                                  I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'S_CARR_ID' IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    endmethod.

  • How to implement more than one physical models from the same model

    Hello,
    We have designed a relational model for our application and now, we would like to implement it for our 4 environments: Development, Test, User-Test and Real. Each one has the same logical schema but, different physical clauses (i.e.: in development environment we will not use partitioning clauses).
    Is this possible?
    Thank you,
    Bernat Fabregat

    Hello Bernat,
    yes it's possible:
    1) open your design and go to Tools>"RDBMS site administration"
    2) add your sites there (Current design) - Development, Test, User-Test and Real; press ok when finish
    3) go to "Physical models" node in browser and use "new" from pop-up menu - your sites will appear in list
    4) after you set physical objects in one model (need to save it as well)l, you can clone those objects in other models - you can clone from lower or the same database version
    You can consider usage of "name substitution" functionality during DDL generation if objects should have different name (prefix) in different environment - in this there will be no need to change the name of objects in models.
    Philip

  • Simultaneous httpservice in the same component

    Dear Flexer,
    I created an Air application.
    On loading my component, I'd to make simultaneous request to my database to load some data to my component.
    My component is a form with several comobobox and and text field.
    But to do that I have two major problem.
    - Sometimes, my form (my component) is loaded but there no information  in my text field, perhaps request is not finished? but how to verify  that and how to solve.
    - Other question, as requests with http service is for different table,  one to load sudent, other to load note, other to load teaching , is it  possible to do this request in the same php file and to get all thos  informations with the same E4X file.
    Thanks for help
    [Code]
    <?xml version="1.0" encoding="utf-8"?>
    <windowSkin:NativeTitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      xmlns:windowSkin="fr.intersystemes.ui.windowSkin.*"
      xmlns:skins="fr.intersystemes.ui.skins.*"
      xmlns:tabBarClasses="flexlib.controls.tabBarClasses.*"
      minWidth="800" minHeight="800" borderVisible="false"
      creationComplete="onLoad(event)"
      currentState="tb1"
      dropShadowVisible="false"
      skinClass="fr.intersystemes.ui.windowSkin.NativeTitleWinSkin">
    <windowSkin:states>
    <s:State name="tb1"/>
    <s:State name="tb2"/>
    <s:State name="tb3"/>
    <s:State name="tb4"/>
    <s:State name="tb5"/>
    <s:State name="tb6"/>
    </windowSkin:states>
    <fx:Declarations>
    <!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
    <s:HTTPService id="phpPatientDetail"
       showBusyCursor="true"
       useProxy="false"
       resultFormat="e4x"
       method="POST"
       result="detailPatient(event)"
       fault="trace(this + event.fault.toString());">
    </s:HTTPService>
    <s:HTTPService id="phpLoadTypeDossier"
       showBusyCursor="true"
       useProxy="false"
       resultFormat="e4x"
       method="POST"
       result="allDossier(event)"
       fault="trace(this + event.fault.toString());">
    </s:HTTPService>
    <s:RadioButtonGroup id="rbsex"/>
    </fx:Declarations>
    <fx:Metadata>
    [Event(name="myEventClose", type="fr.intersystemes.ui.windowSkin")]
    </fx:Metadata>
    <fx:Script>
    <![CDATA[
    import fr.intersystemes.VO.PatientVO;
    import fr.intersystemes.config.urlManager;
    import fr.intersystemes.util.DateUtility;
    import fr.intersystemes.util.FileSerializer;
    import fr.intersystemes.util.UserPrefs;
    import mx.collections.ArrayCollection;
    import mx.events.FlexEvent;
    import mx.events.IndexChangedEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    import spark.events.IndexChangeEvent;
    [Bindable]
    public var monIdPatient:String;
    private var pg:UserPrefs;
    [Bindable]
    public var PAT_TB_ARRAY:ArrayCollection = new ArrayCollection (
    [{label:"Personnelles"},
    {label:"Assuré & Sécu. Soc"},
    {label:"Compléments perso"},
    {label:"Autres adresses"},
    {label:"Cursus"},
    {label:"Archives"}]
    [Bindable]
    private var DP_PAT_CIVIL:ArrayCollection = new ArrayCollection (
    [{label:"Monsieur"},
    {label:"Madame"},
    {label:"Mademoiselle"},
    {label:"Le Jeune"}]
    [Bindable]
    private var DP_PAT_ADRDEF:ArrayCollection = new ArrayCollection (
    [{label:"Monsieur"},
    {label:"Madame"},
    {label:"Mademoiselle"},
    {label:"Le Jeune"}
    [Bindable]
    private var DP_PAT_DOS1:ArrayCollection = new ArrayCollection (
    [{label:"N° Etudiant"},
    {label:"N° INEE"},
    {label:"Liberer"}
    [Bindable]
    private var DP_PAT_DOS2:ArrayCollection = new ArrayCollection (
    [{label:"N° Etudiant"},
    {label:"N° INEE"},
    {label:"Liberer"}
    [Bindable]
    private var DP_PAT_TEL:ArrayCollection = new ArrayCollection (
    [{label:"Maison"},
    {label:"Bureau"},
    {label:"Pére"},
    {label:"Mére"}]
    protected function onLoad(event:FlexEvent):void
    this.pg = FileSerializer.readObjectFromFile("prefSaisiePat.up") as UserPrefs;
    var urlPatient:urlManager = new urlManager();
    phpPatientDetail.url=urlPatient.urlService() + "loadStudentById.php";
    var paramsPatient:Object = new Object();
    paramsPatient.idPatient = monIdPatient;
    phpPatientDetail.send(paramsPatient);
    phpLoadTypeDossier.send();
    private function onMyEventClose(e:Event):void
    private function allDossier(event:ResultEvent)
    private var objectPatient:PatientVO;
    private function detailPatient(event:ResultEvent):void
    trace(this + event.result.toString());
    var resultXml:XML = event.result as XML;
    var aNode:XML;
    var list:Array = new Array();
    // we use resultXml.children() (and not resultXml..customer)
    var dateConv : DateUtility = new DateUtility();
    trace ("result" + resultXml.children().length());
    for each (aNode in resultXml.children())
    objectPatient = new PatientVO();
    objectPatient.paIndex = Number(aNode.@id);
    objectPatient.paNomP = aNode.@np ;
    objectPatient.paPrenom = aNode.@pr ;
    objectPatient.paCodePostal = aNode.@cp;
    objectPatient.paDossier1 = aNode.@d1;
    objectPatient.paDossier2 = aNode.@d2;
    objectPatient.paNaissance = dateConv.dateStringToObject(aNode.@dn);
    objectPatient.paNumTel1 = aNode.@tel;
    lNom.text = objectPatient.paNomP;
    lPrenom.text = objectPatient.paPrenom;
    //lAge.text = dateConv.calculAgeAn(objectPatient.paNaissance) as String;
    lAge.text = " - " + dateConv.calculAgeAn(objectPatient.paNaissance) + " ans et " + dateConv.calculAgeMois(objectPatient.paNaissance) + " mois";
    lNaissance.text = "Né(e) le " + dateConv.dateToStringFR(objectPatient.paNaissance);
    this.title = objectPatient.paNomP + " "+ objectPatient.paPrenom;
    fdNom.text = objectPatient.paNomP;
    dfNaissance.text = dateConv.dateToStringFR(objectPatient.paNaissance);
    private function reloadPatient():void{
    private function tbClickEvt(evt:IndexChangeEvent):void {
    // Access target TabBar control.
    //var targetComp:TabBar = TabBar(evt.currentTarget);
    switch(evt.target)
    case 0:
    currentState="tb1";
    break;
    case 1:
    currentState="tb2";
    break;
    case 2:
    currentState="tb3";
    break;
    case 3:
    currentState="tb4";
    break;
    case 4:
    currentState="tb5";
    break;
    case 5:
    currentState="tb6";
    break;
    default:
    currentState="tb1";
    break;
    ]]>
    </fx:Script>
    <s:Group width="100%" height="100%">
    <s:layout>
    <s:BasicLayout/>
    </s:layout>
    <s:Image x="0" y="0" width="53" height="53" click="reloadPatient()"/>
    <s:VGroup x="100" y="8" width="100%" gap="5" verticalAlign="top"> <!-- Groupe central-->
    <s:HGroup> <!-- Nom prenom-->
    <s:Label text="Nom" id="lNom" fontWeight="bold"/>
    <s:Label text="Prénom" id="lPrenom" fontWeight="bold"/>
    </s:HGroup>
    <s:HGroup width="100%"> <!-- Naissance-->
    <s:Label text="Naissance" id="lNaissance" />
    <s:Label text=" / Age" id="lAge"/>
    </s:HGroup>
    </s:VGroup >
    <s:VGroup x="730" y="0" horizontalAlign="right" verticalAlign="top" paddingLeft="5"> <!-- Modif-->
    <s:Label text="Crea" id="lCrea"/>
    <s:Label text="Modif" id="lModif"/>
    </s:VGroup>
    <!-- Partie avec onglet-->
    <s:ButtonBar x="0" y="74" dataProvider="{PAT_TB_ARRAY}" change="tbClickEvt(event);"/>
    <s:Form x="0" y="94" id="foPerso" width="100%" height="100%" includeInLayout="true" includeIn="tb1">
    <s:layout>
    <s:FormLayout gap="3" paddingLeft="0"/>
    </s:layout>
    <s:HGroup width="100%" gap="3" horizontalAlign="left" resizeMode="noScale"
      verticalAlign="baseline" >
    <s:DropDownList id="cbQualite" dataProvider="{DP_PAT_CIVIL}"/>
    <s:FormItem label="Nom" >
    <s:TextInput id="fdNom" width="200" focusColor="#D55E5E" focusEnabled="true"
    tabIndex="1" text="Mon nom"/>
    </s:FormItem>
    <s:FormItem  label="Prénom" >
    <s:TextInput id="fdPrenom" width="200" tabIndex="2"/>
    </s:FormItem>
    <s:DropDownList id="cbDossier1" dataProvider="{DP_PAT_DOS1}" width="118" height="22" tabIndex="3"/>
    <s:FormItem label="" >
    <s:TextInput id="fDossier1" width="90" paddingRight="5" tabIndex="4"/>
    </s:FormItem>
    </s:HGroup>
    <s:Group>
    <s:FormItem label="Naissance" tabIndex="5" >
    <mx:DateField id="dfNaissance" width="100" editable="true" formatString="DD/MM/YYYY" yearNavigationEnabled="true"/>
    </s:FormItem>
    <s:RadioButton x="90" y="0" label="Masculin" group="{rbsex}" tabIndex="6"/>
    <s:RadioButton x="170" y="0" label="Féminin" group="{rbsex}" tabIndex="7"/>
    <s:DropDownList id="cbDossier2" x="340" y="0" width="118" height="22"
    dataProvider="{DP_PAT_DOS1}" tabIndex="8"/>
    <s:FormItem x="460" y="0" label="" tabIndex="9">
    <s:TextInput id="fDossier2" width="90" paddingRight="5"/>
    </s:FormItem>
    </s:Group>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Qualité" tabIndex="10">
    <s:DropDownList id="cbQualiteParent" width="130"/>
    </s:FormItem>
    <s:FormItem label="Nom" tabIndex="11">
    <s:TextInput id="tiNomPar" width="200" text="NomParent"/>
    </s:FormItem>
    <s:FormItem label="Prénom" tabIndex="12">
    <s:helpContent>
    <s:VGroup>
    <s:Label text="Prénom du responsable" />
    </s:VGroup>
    </s:helpContent>
    <s:TextInput id="tiPrenomPAr" width="200"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Adresse par défaut"  tabIndex="12" >
    <s:DropDownList id="cbAdrDef" dataProvider="{DP_PAT_ADRDEF}"/>
    </s:FormItem>
    <s:FormItem label="Adresse" tabIndex="13">
    <s:TextInput id="tiAdr1" width="480" text="Adr"/>
    <s:TextInput id="tiAdr2" width="480"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Code Postal" tabIndex="14">
    <s:TextInput id="tiCP" text="CP" width="65"/>
    </s:FormItem>
    <s:FormItem label="Ville" tabIndex="15">
    <s:TextInput id="tiVille" text="Ville" width="250"/>
    </s:FormItem>
    <s:FormItem label="Pays" tabIndex="16">
    <s:TextInput id="tiPays" text="Pays" width="175"/>
    </s:FormItem>
    </s:HGroup >
    <s:HGroup height="20" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline" paddingTop="5">
    <s:Label text="Téléphones"/>
    <s:Spacer width="39" height="20"/>
    <s:Label text="SMS"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel1" dataProvider="{DP_PAT_TEL}" tabIndex="17"/>
    <s:CheckBox id="cbSMS1" selected="true" tabIndex="18"/>
    <s:TextInput id="paTel1" width="120" text="Tel1" tabIndex="19"/>
    <s:TextInput id="paRemTel1" width="480" text="RemTel1" tabIndex="20"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel2" dataProvider="{DP_PAT_TEL}" tabIndex="21"/>
    <s:CheckBox id="cbSMS2" selected="true" tabIndex="22"/>
    <s:TextInput id="paTel2" width="120" text="Tel2" tabIndex="23"/>
    <s:TextInput id="paRemTel2" width="480" text="RemTel2" tabIndex="24"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:DropDownList id="paTabTel3" dataProvider="{DP_PAT_TEL}" tabIndex="25"/>
    <s:CheckBox id="cbSMS3" selected="true" tabIndex="26"/>
    <s:TextInput id="paTel3" width="120" text="Tel3" tabIndex="27"/>
    <s:TextInput id="paRemTel3" width="480" text="RemTel3" tabIndex="28"/>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Télécopie">
    <s:TextInput id="paFax" width="120" text="Fax" tabIndex="29"/>
    </s:FormItem>
    <s:FormItem label="Email">
    <s:TextInput id="paMail" width="333" text="Mail" tabIndex="30"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Prof. des parents">
    <s:TextInput id="paProfPar" width="180" text="Prof Par" tabIndex="31"/>
    </s:FormItem>
    <s:FormItem label="du père">
    <s:TextInput id="paProfPere" width="180" text="du père" tabIndex="32"/>
    </s:FormItem>
    <s:FormItem label="de la mère">
    <s:TextInput id="paProfMere" width="180" text="de la mère" tabIndex="33"/>
    </s:FormItem>
    </s:HGroup>
    <s:Line width="100%" height="3"/>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub1" >
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR1" width="220" text="Rub1" tabIndex="34"/>
    <s:CheckBox id="cbRB1" tabIndex="35"/>
    </s:FormItem>
    <s:FormItem label="Rub5">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR5" width="220" text="Rub5" tabIndex="36"/>
    <s:CheckBox id="cbRB5" tabIndex="37"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub2">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR2" width="220" text="Rub2" tabIndex="37"/>
    <s:CheckBox id="cbRB2" tabIndex="38"/>
    </s:FormItem>
    <s:FormItem label="Rub6">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR6"  width="220" text="Rub6" tabIndex="39"/>
    <s:CheckBox id="cbRB6" tabIndex="40"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub3">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR3"  width="220" text="Rub3" tabIndex="41"/>
    <s:CheckBox id="cbRB3" tabIndex="42"/>
    </s:FormItem>
    <s:FormItem label="Rub7">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR7"  width="220" text="Rub7" tabIndex="43"/>
    <s:CheckBox id="cbRB7" tabIndex="44"/>
    </s:FormItem>
    </s:HGroup>
    <s:HGroup width="100%" horizontalAlign="left" resizeMode="noScale" verticalAlign="baseline">
    <s:FormItem label="Rub4">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR4"  width="220" text="Rub4" tabIndex="45"/>
    <s:CheckBox id="cbRB4" tabIndex="46"/>
    </s:FormItem>
    <s:FormItem label="Rub8">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="paUserR8"  width="220" text="Rub8" tabIndex="47"/>
    <s:CheckBox id="cbRB8" tabIndex="48"/>
    </s:FormItem>
    </s:HGroup>
    </s:Form>
    </s:Group>
    </windowSkin:NativeTitleWindow>
    [/Code]

    Hello Regina,
    That is what I did, and after your answer I checked everything again and I saw I did all right but when embeding the second ALV view by mistake I embeded the first one again.
    Now it is working!
    Thanks,
    Mauricio

Maybe you are looking for