How to get initial value of Child View from Parent View in ADF?

Hi,
I am typically from a Oracle forms background and new to ADF.
In ADF,how can I populate the initial value for a new record in child view from the parent view?
For example.. using standard Departments and Employees tables which has parent child relation ship.
If I want to create a new employee.. how do I get the initial value for department_id of my employee record(employee table) from departments table in ADF?
Thanks in advance
Vishnu

USer, please tell us your jdev version!
If  you have setup the data model in a way that it reflects this relationship (should be automatic if you use the 'create business components from table' wizard) this is pretty easy.
To check this, open the application module and select the data model. On the right side you see departments view and under it indented the employees view. This indent shows you that the employees view is a child of the departments view. This is all you nee for the model layer.
In the UI you open the datacontrol and open the departments view. One node it the employees view (as child). Now, if you work on a department (e.g. you drag the department view onto a page and drop it as form), you can add a button to create a new child (employee) by opening the employee node in department and drag the createInsert operation onto the page and drop it as button.
Then create a new page and drop the employees view (the child from departments view) on to the page and drop it as form. This form will then display the new row for thew employee of hte department.
Last thing to do is to add anavigation case from the departments page to the employees page and select this on the CreateInsert button.
The form should have the DepartmentId pre-selected.
Timo

Similar Messages

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • How to get Zoom value in scroll viewer in C# wpf Kinect SDK 2.0?

    I have recently started using the Kinect SDK 2.0 and am focusing on a zoom and pan functionality, as in the Control Basics-WPF sample.
    I have got the zoom and pan functionality up and running. The problem is that I wish to access the value of the amount of zoom which has been performed by the Pinch zoom gesture.
    Here is my xaml:
        <UserControl x:Class="ImageNav.NavigationImage"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:k="http://schemas.microsoft.com/kinect/2014"
              mc:Ignorable="d"
              d:DesignWidth="1200"
              d:DesignHeight="700"
              >
            <Grid Grid.RowSpan="2">
                <ScrollViewer Name="scrollViewer" Grid.Row="0"
                              HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                              k:KinectRegion.IsHorizontalRailEnabled="true" k:KinectRegion.IsVerticalRailEnabled="true"
                              k:KinectRegion.ZoomMode="Enabled">
                    <Image Name="navigationImage" RenderTransformOrigin="0.5, 0.5" />
                </ScrollViewer>
                <TextBox x:Name="ZoomTextBox" Grid.Row="1" TextWrapping="Wrap" Text="Zoom: 100%" IsEnabled="False" Panel.ZIndex="10" BorderThickness="0"
    HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="20"/>
            </Grid>
        </UserControl>
    I would have wanted there to be something like `k:KinectRegion.ZoomFactor`, but that isnt available. I've also tried to see what changes in the UI elements when I perform the zoom gesture, by writing the `Height` and `ActualHeight` properties of the `ScrollViewer
    scrollViewer` and `Image navigationImage` to a log file, but they show no change whatsoever.
    When I perform the zoom gesture, I would like to get the value of zoom i.e. the current height and width of the image with respect to the original height and width.

    You might want to look deeper into how the scrollviewer works in WPF. I don't know the specifics but I am sure it doesn't change the physical size of the image, but modifies it's rendering properties of the ScrollViewer transform(zoom == scale). You can
    probably subscribe to an event whenever there is a change detected.
    Carmine Sirignano - MSFT

  • How to populate Initial value of a field from another item value

    Hi
    In my expense report entry screen I have justification and description fields. My description field is getting value from the database. I want justification field also get the value same as what description has. Could you guide me on how to achieve this via personalization?
    Thank you.

    Hi,
    user622444 wrote:
    In my expense report entry screen I have justification and description fields. My description field is getting value from the database. I want justification field also get the value same as what description has. Could you guide me on how to achieve this via personalization?---Copy the viewAttribute name of the description
    ---Paste it in Justification view Attribite property.
    Regards
    Mehar Irk

  • How to get Multiple Values for a key from a session object?

    Hi,
    It might seem dumb but I am facing a problem here with the session object. I'll paste the session object's content from the netbeans "Local Variables" window for clarity -
    Name Type Value
    hsession StandardSessionFacade #66
    session LWSFSession #69
    inherited
    attributes Hashtable #80
    [0] Hashtable$Entry "cart"=>#115
    key String "cart"
    value DummyCart #115
    item null
    submit null
    v Vector
    [0] String Full Metal Jacket
    [1] String As Good As It Gets
    [2] String Tim
    What I want is to get the values "Full Metal Jacket", "As Good As It Gets" and "Tim" from the session obejct?
    The problem I am facing is that if I do a session.getAttribute("cart"), I'll get a single value in return. What will that value be? Will it be "item", "submit" or "v"? And if I want all the values in v above, how can I get them?
    Thanks.

    None of the above.
    HttpSession.getAttribute() will return what you put into it using HttpSession.setAttribute(). In your case, it'll return an Object which you need to cast to DummyCart. Then you can access the data in DummyCart using the API of the DummyCart class.
    hth

  • How to get a value of attribute/field From another Component/bol

    Hello
    I have to write some code in Component GS_CM/DocList.
    From 'GS_CM' I have to get a value of field attribute-STATUS_CURRENT
    From BT115QH_SLSQ/Details
    Context Node = BTSTATUSH
    Attributes = STATUS_CURRENT
    In order to check and enable some other functions.
    I know how to do it when I'm in the BT115QH_SLSQ/Details
    lr_status ?= typed_context->btstatush->collection_wrapper->get_current( ).
    lv_statush = lr_status->get_property_as_string( iv_attr_name = 'STATUS_CURRENT' ).
    But, in my Componenet GS_CM/DocList  the field  "BTSTATUSH->COLLECTION_WRAPPER->GET_CURRENT" is unknown. It is not contained in one of the specified tables nor is it defined .
    would be very grateful if you could help to solve this issue.
    Thanks In Advance
    Sima

    Hi Sima,
    then another short hint to the WD_USAGE_INITIALIZE.
    Go to the component workbench, open the component BT115QH_SLSQ. Go now to the component controller class, go to it's methods. You will see that in the coding of the Method WD_USAGE_INITIALIZE, on the class CL_BT115QH__BSPWDCOMPONEN_IMPL:
    WHEN 'CUGSCM' OR 'CUGSCM_DET'.
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
    "          iv_name             = 'ContentManagementCuCo'     "Custom Controller Name
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'     "Custom Controller Name
              iv_target_node_name = 'CMBO'      "Name of Node in this Custom Controller
              iv_node_2_bind      = 'CMBUSOBJ'. "Name of Node in used component GS_CM
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'"#EC NOTEXT
              iv_target_node_name = 'ATTRIBUTES'                "#EC NOTEXT
              iv_node_2_bind      = 'ATTRIBUTES'.               "#EC NOTEXT
    Now I checked the context on the component controller and it contains the statusH, the node which you want to use in the component GS_CM. So make sure to prepare the GS_CM component by adding the Status context, and afterwards just add the binding in the code I pointed out above.
    Best regards,
    Erika

  • How to get current value of checkBox on button press programatically in adf

    Hi,
    I want to get the current value of checkbox(checked/unchecked or 0/1) in my java bean whenever I press submit button on my jspx page.
    My JDeveloper version is : 11.1.1.6.0

    Where is the checkbox value bind to? The status of hte checkbox is hold in the value property of the checkbox. This is normally an EL like
    #{bindings.Myvar1.inputvalue}or something pointing to a bean property. This value can be read from the action listener of your submit button
            BindingContainer bindingContainer = BindingContext.getCurrent().getCurrentBindingsEntry();
            AttributeBinding attr = (AttributeBinding)bindingContainer.getControlBinding("Myvar1");
            Object obj = attr.getInputValue();Timo

  • How to get different value in second view of webdynpro?

    hello guys,
    In ABAP webdynpro I am trying to create one application having two views.
    One view contains input field and another view contains table control.
    In module pool if one screen contains input field then second screen display the details in table as per the selection criteria in first screen,same way here in first view what ever I will enter as per the selection details should get display in the table.
    Now I have created the application  and now I am executing the application.
    Here in first view in input field  I am entering the selection criteria and when I am nevigating to second view it desplaying the details what I want in the table but now I am having one more pushbutton to nevigate to first view again and I am trying to enter the value but this time in the second view in the table it showing me the same details what there was in previouse details.
    Can anybody please help me out?

    Hi
    YOu can use it in WDDOINIT Method associated with the VIEW just go to attribute tab and
    IF_FLIGHT_VIEW double click on this Interface you will get all the methods.
    Don't worry about all these methods.
    Use Web Dynpro Code Wizard to get the required Declarations ( Hope you did it already) .
    your element instance combined with the method Name.
    For reference take the help of  WDR_TEST_UI_ELEMENTS.
    Cheer and Happy Diwali
    Ram

  • How to get column value in grid View

    Hello My first Language is German so bear with my English
    FIRST vIEW THE SCREEN SHOT PLEASE
    I am new to asp.net  i am making small application to generate reports in which user give criteria just liek we do in sql server  i have two grid view in accordion section then there is button  so Both GridView has headers that  Name
    , Output and Filter
    Name shows the Column of database fields, output column has check box if user check box it will only display those columns and filter is text box in which we filter our results
    basically i am just trying to do this like sql server in which user check columns to display and also provide filter criteria and then sql query modified according to the grid values.
    i have attached the screen shot of grid view kindly view it please You will have idea what i am tyring to say 
    now i want some help in filter criteria 
    suppose user check ref Code, School,Program, Name in the grid view and press show button
    it generates query
    select RefCode,School,Program,Name from Applicant.
    now i want to apply where clause if user write something in filter text box which i can not do kindly help me out and view the screen shot my desire outcome is if user check column and also write some value in RefCode filter textbox let suppose '0565-01'
    and in School Text user write SBE
    it should generate  sql
    select RefCode,School,Program,Name from Applicant where (RefCode='0565-01')and (School='SBE');
    my code for show button which generate simple select statement without where clause is below.
    protected void Button2_Click(object sender, EventArgs e)
    String output = "";
    String filter = "";
    foreach (GridViewRow row in gvExperience.Rows)
    CheckBox cb = (CheckBox)row.FindControl("CheckBox1");
    if (cb.Checked == true)
    output += row.Cells[0].Text.ToString() + ','; // get the Name of columns and concate in output variable }
    output = output.Remove(output.LastIndexOf(","), 1)
    string sql = "select " + output + " from Applicant"; // display the query
    bindoutput(sql); // pass this query and bind the new gridview which contain generated sql
    Azeem

    Hi Azeem,
    >>I am new to asp.net  
    Please ask on this forum instead:
    http://forums.asp.net/24.aspx/1?Web+Forms+Data+Controls
    ASP.NET issue is not related to WinForm forum.
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get node value of XML file from XMLTYPE field of databases

    Hi,
    I want to select node value of XML from XMLTYPE field of oracle db into java code.
    Feel free to answer me if you have any idea about it.
    Thanks

    For XMLType refer
    http://www.oracle.com/oramag/oracle/01-nov/o61xml.html
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb04cre.htm

  • Reflection: how to get the name of a subclass from parent class?

    Suppose I have a parent class P and two subclasses S1, and S2. There's another method which has an argument of type P. Inside this method, I want to inspect the object (of type P) passed in and print its name, such as "S1" or "S2". How do you do that? I tried Class.getSimpleName(), but "P" is returned no matter which subclass objects you have. Thanks:)

    That's the same as you said last time, and I'm telling you that's not what happens when I test it:
    public class Parent {
    public class SubclassOne extends Parent {
    public class SubclassTwo extends Parent {
    public class TestGetName {
      public static void main(String[] argv) {
        showNames(new SubclassOne());
        showNames(new SubclassTwo());
        showNames(new Parent());
      private static void showNames(Parent p) {
        System.out.println("Name: " + p.getClass().getName());
        System.out.println("Simple name: " + p.getClass().getSimpleName());
        System.out.println("Canonical name: " + p.getClass().getCanonicalName());
    }prints:
    Name: SubclassOne
    Simple name: SubclassOne
    Canonical name: SubclassOne
    Name: SubclassTwo
    Simple name: SubclassTwo
    Canonical name: SubclassTwo
    Name: Parent
    Simple name: Parent
    Canonical name: ParentYou must be doing something else that you're not saying. Either that or you're expressing yourself very poorly. Why not post a simple, self-contained, compilable example of what you claim is happening?

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to get parameter value from report in event of value-request?

    Hi everyone,
    The customer want to use particular F4 help on report, but some input value before press enter key are not used in event of "at selection-screen on value-request for xxx", How to get parameter value in this event?
    many thanks!
    Jack

    You probably want to look at function module DYNP_VALUES_READ to allow you to read the values of the other screen fields during the F4 event... below is a simple demo of this - when you press F4 the value from the p_field is read and returned in the p_desc field.
    Jonathan
    report zlocal_jc_sdn_f4_value_read.
    parameters:
      p_field(10)           type c obligatory,  "field with F4
      p_desc(40)            type c lower case.
    at selection-screen output.
      perform lock_p_desc_field.
    at selection-screen on value-request for p_field.
      perform f4_field.
    *&      Form  f4_field
    form f4_field.
    *" Quick demo custom pick list...
      data:
        l_desc             like p_desc,
        l_dyname           like d020s-prog,
        l_dynumb           like d020s-dnum,
        ls_dynpfields      like dynpread,
        lt_dynpfields      like dynpread occurs 10.
      l_dynumb = sy-dynnr.
      l_dyname = sy-repid.
    *" Read screen value of P_FIELD
      ls_dynpfields-fieldname  = 'P_FIELD'.
      append ls_dynpfields to lt_dynpfields.
      call function 'DYNP_VALUES_READ'
        exporting
          dyname     = l_dyname
          dynumb     = l_dynumb
        tables
          dynpfields = lt_dynpfields
        exceptions
          others     = 1.
      check sy-subrc is initial.
    *" See what user typed in P_FIELD:
      read table lt_dynpfields into ls_dynpfields
        with key fieldname = 'P_FIELD'.
    *" normally you would then build your own search list
    *" based on value of P_FIELD and call F4IF_INT_TABLE_VALUE_REQUEST
    *" but this is just a demo of writing back to the screen...
    *" so just put the value from p_field into P_DESC plus some text...
      concatenate 'This is a description for' ls_dynpfields-fieldvalue
        into l_desc separated by space.
    *" Pop a variable value back into screen
      clear: ls_dynpfields.
      ls_dynpfields-fieldname  = 'P_DESC'.
      ls_dynpfields-fieldvalue = l_desc.
      append ls_dynpfields to lt_dynpfields.
      call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname     = l_dyname
          dynumb     = l_dynumb
        tables
          dynpfields = lt_dynpfields
        exceptions
          others     = 0.
    endform.                                                    "f4_field
    *&      Form  lock_p_desc_field
    form lock_p_desc_field.
    *" Make P_DESC into a display field
      loop at screen.
        if screen-name = 'P_DESC'.
          screen-input = '0'.
          modify screen.
          exit.
        endif.
      endloop.
    endform.                    "lock_p_desc_field

Maybe you are looking for

  • Error when Connect to Access 2007 with password using OLEDB

    Hi there, I am seeing the below error when trying to Connect to Access 2007 with password using Crystal XI or Crystal 2008, when using the OLEDB to connection Access data. Logon failed Details: DAO Error Code: 0xd0f Source: DAO.Workspace Description:

  • My itunes wont open at all??

    I have a windows vista and my itunes store wasnt opening due to something with my network? I checked my network and it was fine. So I downloded the newest version and it opened at first but the problem still continued. Now its not opening at all. Hel

  • How to get values against checkbox from table

    hi all, how can i get column values from database against multiple check boxes, is there array in oracle to store multiple values? i stored value of check boxes in column named checkid, in table named information. now i want to get value of infoid ag

  • My documents are grey.

    I just downloaded the latest Reader, adjusted the settings as in other posts and my documents are still grey. They print, but I can't see them to edit them.  They also download to Word as grey.  I need them, please

  • I found a 3rd party Adobe support forum

    http://adobe.groupbrowser.com/forum68.html