problem in Master Details view

Hi all
using jdev11.2
When insert new row in detail its ok I if commit but if cancelling the current masters lost record and become the first* record in the view with its details?

can any one help

It is a side effect of the restoration. Read:'t-fit-all.blogspot.com/2007/02/jdeveloper-and-art-of-rollback.html http://one-size-doesn

CM.

Tags: Java

Similar Questions

  • Problems on master detail CRUD

    Dear all,

    I'm trying to understand how ADFBC manages the relationship master detail like this
    is the first time where I need to manage the table relation.
    Practice, I only used a table but this time I need to manage the relationship, too.

    I have two tables that follow. They have a to-many.
    PART_ID in the PARTS_CODE table is filled by a sequence of DB.
    PARTS_CODE                                   PART_DESC
         - PART_ID (PK)                              - PART_ID (PK)
         - RANGE                                   - REGION  (PK)
         - CATEGORY                              - DESC
    Use case is like this:
    Table PARTS_CODE contains data on the parties while PARTS_DESC contains information on the description of the specific region of the parts.

    Now, I created a View object that links the two tables. Then I drag this display object from
    my data as a control table update-able.

    I just have a few questions on the implementations:
    1 when I drag and drop the CreateInsert button and click on it, I noticed that it adds a new line to the
    table, but I noticed that it creates the Text Input component only on the associated columns
    the PARTS_CODE Table, the other columns for the PART_DESC does not have the user interface components.
    How to solve this problem?

    2. how to manage the relationship such that when it inserts the data on the PARTS_CODE, I need
    to get the DB generated sequence number and put it in the PART_DESC table

    3. any demonstration/links which shows the CRUD operations involving arrays of master detail?

    I searched the forum for Crud master / detail, but I can only see the display of the relationship and not
    CRUD operations.

    Found this blog too http://andrejusb.blogspot.com/2009/03/create-operation-for-master-detail.html, but
    I can't even fully understand.

    JDEV 11G PS3

    Thank you

    You will need to create a black and white view link in your main table and details. The blog provides the code example if you step through the code, you will get to know exactly how it's done.

  • Problem of master / detail

    Hello

    I have 3 blocks in my form

    control unit 1 for the search criteria.

    2. master / detail blocks (2), where ownership of the main block clause is "' item_id =: search.item_id", the block of research concerns the search criteria (control block), "

    -: search.item_id is what I am looking for with its value.

    I open the form, I write 2 the: search.item_id, the data is retrieved in the main blocks and details, but what happens is that when I change the "2" "3"

    the data contained in the block of retail have disappeared, and the data in the master is still such what without change, I don't know why.

    I am sure that he has given belong to the number '3 '.

    -the search button has this code:

    go_block ('stock');      -stock is the main block.

    execute_query;

    Thanks for the reply,

    1. I found the problem,

    There is a function in the form

    function qty return number is
    begin
    select something , something2 , something3
    into :item1 , :item2 , :item3
    from dual ;
    return 6 ;
    end ;
    

    and there was an article that I created to entrust this function as a formula, but I think that the function that create must return a variable not a number.

    and this variable should be in the clause 'in', he has solved when I changed it.

    2-i, created a control block, because the user can change the item_id and save the form, does not search form, then it will update the data. right?

  • Problem of master / detail ADF

    Hi all

    I use JDeveloper 11 g. I have a master relationship charts / single detail (such as order-orderItem). On the first page, I have a table that is generated by "ADF Panel with Query Table" to display all commands. There are two buttons on the page, to change and to display the items in order. Once one of the commands in the table is selected, the Edit command will go to the change order page that works fine and the command display items will be donated to the controls page that simply displays the items associated with the selected command. However, when I go to the page of items in order, it always displays all of the items associated with all orders, rather than just the selected command. Did anyone have any ideas what I'm missing?

    Thanks in advance,

    John Wang

    If you juts simply open a page of the default query is executed (in your case, it's a select * to oderItem) and you see all the elements of all kinds.

    You should open the data control, seek the views of the order, expand the appearance of the view for the orderItem inside the orderView view and drag it to the button. Link the button in the action to perform, and you should see the items on the agenda.

    Timo

  • MapView - Table | Master detail

    Hello

    I have a plan and I need to update a table accordingly to what the user selects on the plan. For example, the user clicks on a State on the map and watch the State news. I tried to use master detail that connects between the map and the table but I don't seem to work. Does anyone have a suggestion or a workaround?

    Thanks in advance,

    William Janoti

    Probably you have not added State column in Table guest section of the table display. Or maybe the status column in the view map and table are mapped to the columns of different logics.

    Its pretty simple and I never found problems with master-detail map to the Table.

    Thank you

  • How to reference the link column in the detail view

    I have a pretty simple question that turns everyone strain. I created a simple report and defined a column of link to point to a page of edition to the line items. So far, everything is great and works as expected.

    Now I use the detail view to replace the standard HTML code for each LINE of my report. I can access all the #COLUMN_NAME #s to fill my own HTML for each ROW with the values of the report.

    How can I reference the column link in my view detail? What is the # to #SUBSTITUTION_STRING it? How can I find out about all available alternative channels?

    Thank you

    Jan

    That's the problem with the detail view, it is difficult to add conditional fields without the ugly SQL.

    Another alternative is the named report model, but it shares the same problem

    APEX reports: layout custom with a column named (model line)

  • Page master detail problems

    Hi, using the tuning page Wizard master detail in DW MX and CF 7, I found a problem that I can't fix. The first page in the master page looks great, but when I use the 'next' button it display any records. I found that none of the paging buttons works to display the records. I was wondering if there was a known bug or problem with this page of assistant master-details.

    Here is my code:

    < name = "cfparam FORM.vehicle_type" default = "1" > "
    < name = "cfparam FORM.vehicle_yearup" default = "" > "
    < name = "cfparam FORM.vehicle_yeardown" default = "" > "
    < name = "cfparam URL.recordID" default = "1" > "
    < name = "cfparam URL.ad_id" default = "1" > "
    < name = "cfparam FORM.model" default = "1" > "
    < name = "cfparam FORM.ad_id" default = "1" > "
    < cfparam name = default "PageNum_vehicleSearch" = "1" >
    < cfset CurrentPage = GetFileFromPath (GetTemplatePath ()) >
    < cfquery name = "vehicleSearch" datasource = "ASA" >
    SELECT * FROM saa.vehicle_ad WHERE the veh_year BETWEEN ' #FORM.vehicle_yearup # ' AND ' #FORM.vehicle_yeardown # ' AND vehicle_type = ' #FORM.vehicle_type # ' ORDER BY veh_year ASC
    < / cfquery >
    < cfset MaxRows_vehicleSearch = 7 >
    < cfset StartRow_vehicleSearch = Min ((PageNum_vehicleSearch-1) * MaxRows_vehicleSearch + 1, Max (earch vehicles.) RecordCount, 1)) >
    < cfset EndRow_vehicleSearch = Min (StartRow_vehicleSearch + MaxRows_vehicleSearch-1, vehicleSearch.Rec ordCount) >
    < cfset TotalPages_vehicleSearch = Ceiling(vehicleSearch.RecordCount/MaxRows_vehicleSearch) > <! DOCTY PE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" " http://www.w3.org/TR/html4/loose.dtd" >
    < html >
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    buyerSearchresults < title > < /title >
    < style type = "text/css" >
    <!--
    {.style1}
    do-size: 18px;
    make-weight: bold;
    }
    .style3 {make-size: small}
    {.style4}
    do-size: 12px;
    make-weight: bold;
    }
    ->
    < / style >
    < / head >

    < body >
    < h2 align = "left" > click 'Image' or 'Create' to view the vehicle details < / h2 >
    < table width = "800" height = "100" border = "1" bordercolor = "#0000FF" >
    < b >
    < td align = "center" valign = "middle" > < span class = "style4" > picture </span > < table >
    < td align = "center" valign = "middle" > < span class = "style4" > year </span > < table >
    < td align = "center" valign = "middle" > < span class = "style4" > do </span > < table >
    < td align = "center" valign = "middle" > < span class = "style4" > template </span > < table >
    < td align = "center" valign = "middle" > < span class = "style4" > price </span > < table >
    < td align = "center" valign = "middle" > < span class = "style4" > </span > < table > exterior color
    < td align = "center" valign = "middle" > < span class = "style4" > mileage </span > < table >
    < td align = "center" valign = "middle" > < span class = 'style4' > private seller or distributor </span > < table >
    < /tr >
    < cfoutput query = "vehicleSearch" >
    < b >
    "< td align ="center"valign ="middle"> < a href =" "buyerDetailresults.cfm? recordID = #vehicleSearch.ad_id #" class = "style4" > < img src = "#vehicleSearch.image1 #" width = "80" height = "60" > < table >
    < td align = "center" valign = "middle" class = "style4" > #vehicleSearch.veh_year # < table >
    < td align = "center" valign = "middle" > < a href = "" buyerDetailresults.cfm? recordID = #vehicleSearch.ad_id # "class ="style4"> #vehicleSearch.make # < /a > < table >"
    < td align = "center" valign = "middle" class = "style4" > #vehicleSearch.model # < table >
    < td align = "center" valign = "middle" class = "style4" > #DollarFormat (vehicleSearch.price) # < table >
    < td align = "center" valign = "middle" class = "style4" > #vehicleSearch.ext_color # < table >
    < td align = "center" valign = "middle" class = "style4" > #vehicleSearch.mileage # < table >
    < td align = "center" valign = "middle" class = "style4" > < img src = "#vehicleSearch.dealer_logo #" > < table >
    < /tr >
    < / cfoutput >
    < /table >
    < br >
    < table width = "50%" border = "0" align = "center" >
    < cfoutput >
    < b >
    < td width = "23%" align = "center" > < cfif PageNum_vehicleSearch GT 1 >
    < a href = "#CurrentPage #?" PageNum_vehicleSearch = 1 #QueryString_vehicleSearch #"> first < /a >"
    < / cfif >
    < table >
    < td width = "31%" align = "center" > < cfif PageNum_vehicleSearch GT 1 >
    < a href = "#CurrentPage #?" PageNum_vehicleSearch = #Max (DecrementValue (PageNum_vehicleSearch), 1) # QueryString_vehicleSearch #"> back < /a >"
    < / cfif >
    < table >
    < td width = "23%" align = "center" > < cfif PageNum_vehicleSearch LT TotalPages_vehicleSearch >
    < a href = "#CurrentPage #?" "PageNum_vehicleSearch = #Min (IncrementValue (PageNum_vehicleSearch), Tota lPages_vehicleSearch) # QueryString_vehicleSearch # ' > next < /a >
    < / cfif >
    < table >
    < td width = "23%" align = "center" > < cfif PageNum_vehicleSearch LT TotalPages_vehicleSearch >
    < a href = "#CurrentPage #?" PageNum_vehicleSearch = #TotalPages_vehicleSearch # QueryString_vehicleS earch #"> last < /a >"
    < / cfif >
    < table >
    < /tr >
    < / cfoutput >
    < /table >
    Records < cfoutput > #StartRow_vehicleSearch # #EndRow_vehicleSearch # of #vehicleSearch.RecordCount # < / cfoutput >
    < / body >
    < / html >


    Thanks in advance for any help. Shane

    Found my problem, I did not pass the correct URL variables. Shane

  • Problem with page validation APEX_APPLICATion master detail.  Help!

    I'm having a problem with the Apex_Application.g_fxx data structure.  I'm trying to validate the lines in my page master detail and need to use apex_application.g_f10 as the name of the variable inside the HTML data source electricity.  The name of the item I need is "f10" because it matches the database column "status" on my page.  I'm trying to validate that all the detail items have the same status, or an error is reported.  I use the following PL/SQL block that returns a Boolean value:

    < code >

    declare
    l_first_value varchar2 (4000);
    Start

    -f10 = column PO_STATUS of PO_DETAILS table on a part as a table on the page.

    l_first_value: = apex_application.g_f10 (1);
    because me in 2... apex_application.g_f10. COUNTY
    loop
    If l_first_value! = apex_application.g_f10 (i)
    then
    Returns false;
    end if;
    end loop;
    Returns true;
    end;


    < code >

    The HTML data that I is not intended to "f10" are the following:

    < code >

    < td headers= "Status" class= "t20data" >

    < label for= "f10_0000" class= "hideMeButHearMe" >status< /label>

    < Select name="f10"  id="f10_0000">

    < option value= "" selected= "selected" >make a selection< /option> ""

    < option value= 'APPROVED' >APPROVED< /option>

    < option valeur= « FERMÉ » >FERMÉ< /option>

    </ Select >

    < entry type="hidden" name="f02" value=""  id="f02_0000" />

    < entry type="hidden" name="f03" value="30427" id="f03_0000" />

    < entry type= 'hidden' id= "fcs_0000" name= "fcs" value= "2158A9B101842608F4CA966C0BC1433D" >

    < entry type="hidden" id="frowid_0000" name="frowid" value="" />

    < entry type="hidden" id="fcud_0000" name="fcud" value="D" />

    </ td >


    < code >

    So I do not know why there could be a problem when used to work before this validation.  The PL/SQL block takes the first line of F10 data and compare it to successive lines.  If the data is not equal, then an error occurs and the user is prompted to adjust the data.

    It doesn't work anymore, although I checked and the status are still of points in F10.

    I left mouth gaping.  I do not use an official page master detail previously.  I used two separate front pages: one for the header and one for show master detail.  I've updated the page for the treatment of the more fluid user. I think that even if the data structure would be the same, but maybe I'm wrong.

    Any ideas?


    Thank you!

    Thank you to reproduce the problem so overall. Note that if you will share your workspace in this way you need to change your username to something else than a direct email address and don't use not the actual data for your test cases. Create a guest account to developer without administrator privileges to work space for the members of the forum to use.

    Validation in this app is coded to use a different picture of the description in this thread. Above, you have identified the point like g_f10 dashboard, but the validation code is using g_f09:

    declare
      l_first_value  varchar2(4000);
    begin
    -- f09 = PO_STATUS column of PO_DETAILS table
      l_first_value := apex_application.g_f09(1);
      for i in 2 .. apex_application.g_f09.COUNT
      loop
        if l_first_value != apex_application.g_f09(i)
        then
            return false;
        end if;
      end loop;
      return true;
    end;
    

    Therefore (thanks to instrumentation code added), the validation is running by using the values of the previous column, which was be the one that I have changed according to your instructions:

    0.09114

    0,00018

    ... Posting type "Status check IN." -: FUNC_BODY_RETURNING_BOOLEAN

    4

    0%

    0.09132

    0,00049

    ... Run the statement: select count (*) in the sys.dual where exists (Select 1 from PO_DETAILS where PO_ID =: P230_PO_ID)

    4

    0 g

    0.09181

    0,00015

    ...... Result = true

    4

    0%

    0.09196

    0.00573

    ... Run the statement: declare function x return boolean is begin declare

    l_first_value varchar2 (4000);

    Start

    -f09 = PO_STATUS table PO_DETAILS column

    l_first_value: = apex_application.g_f09 (1);

    apex_debug.message ('g_f09 (1): %s, l_first_value);

    because me in 2... apex_application.g_f09. COUNTY

    loop

    (apex_debug.message('g_f09(%s): %s, i, apex_application.g_f09 (i));

    If l_first_value! = apex_application.g_f09 (i)

    then

    Returns false;

    end if;

    end loop;

    Returns true;

    end;

    Returns a null value. end; begin wwv_flow.g_boolean: = x; end;

    4

    28%

    0.09769

    0.00005

    g_f09 (1): TEST2

    4

    0%

    0.09773

    0.00010

    g_f09 (2): TEST

    4

    0%

    0.09783

    0,00003

    ...... Result = false

    4

    0%

    0.09786

    0.00004

    ...... Does NOT pass

    I created a new liquidation which uses the correct column, but at some point the validation passes and data, so I didn't get a chance to conduct tests.

  • Master detail problem

    Scenario is,

    I have a form master detail. using DBSequence on the two keys on the master and detail. But I am facing problem Parent key not found do not where to insert data. I think that Seqnce with master detail creating problem

    J Dev Version: 11.1.2.0.0

    Consult the:

    http://Ahmed-alzamer.blogspot.com/2013/09/entities-Association-not-composition.html

    Liu Wuhua technology and learning of Notes: insert master / detail in ADF BC

    http://docs.Oracle.com/CD/E23943_01/Web.1111/b31974/bcadveo.htm#ADFFD1149

  • Master - Detail of the object View and Javabean

    I have a table with data from VO (database, let's say in table A). This table has Id, name and processId table. I also have a second table below the first table, what data comes from a javabean (source data not DB). I created this bean data control, which in turn, I created the second table.
    What I want to achieve, it is when a user to select a row in the first table, I wish that the second table is updated according to the processId value of the selected row in the first table.
    Would you share how to do it?

    Thank you.

    Hello

    my Oracle Magazine July/August 2012 column covers a similar use case of Web Services that work in a relationship master / detail with ADF business components view objects. In this article I recommend using the programmatic view objects and entities that this ensures the consistency of the master / detail is handled by the template and cannot be controlled manually on the view layer. I think that the possibility of using a JavaBean domain controller and synchronize it with the object View is a valid option, however, if the rest of your application using ADF business components then I would consider programmatic view objects (and entities if the app is CRUD to the POJO too)

    Here's a sample and a good report:

    http://jobinesh.blogspot.in/2011/06/building-programmatically-managed_25.html
    http://jobinesh.blogspot.in/2011/06/building-programmatically-managed.html

    Frank

  • ADF Faces 11, add where clause to the detail view in the master/detail relationship

    Hello

    I have two display objects only read connected by a link in a relationship master detail.

    They are displayed in a treetable in the form.

    I have a method on the java object impl view master class, I use to add custom where claused based on entries different user and then run the query.

    Works well, master and detail is interview properly.

    But I also want to further filter the detail view (view from destination in the display link). However, as soon as I add whereclause in the detail view against the master
    relationship of detail seems to have disappeared and are no detail record. I also tried to add a view criteria but with the same result.

    Your comments will be appreciated.

    ADF FACES 11g release 1.


    Jan

    You can get the ViewLinkAccessor, then the ViewObject and try to apply the ViewCriteria, followed by executeQuery... what you are already doing.
    Better to paste your code here...

  • Total unique table (no master/detail, no accessors view)

    Hello
    ADF tutorials are full of sum of groovy accessor "wage Total employees of the current Department" showing master/detail.
    I need to make the sum of a column of unique view object and there is no master/detail relationship: object of a view, column, and footer Total.

    There are solutions, each with a downside.

    1. I can have a separate SumViewObject, select sum (attr) in the table. The downside is when I apply panelCollection filters to a table, the filters are not applied to the SumViewObject. So, I see the total value if no filter applied.
    2. I can calculate sum in a bean managed to access lines of the iterator. The disadvantage is that it might be enough number of rows in a table and I must RangeSize the value - 1 to seek what is not good for performance.
    3. I could try to calculate the amount in the same view as an additional line object. Not the best SQL query practice as well.

    So what is the solution of predered?

    Thank you.
    ADF 11.1.2.1

    Hi Ilya,
    define a transitional attribute in your view with the value expression:

    adf.object.findRowSetForRow("").sum ("LabourCostCurrency")

    LabourCostCurrency is the attribute that you want to calculate the total.

    Place this transitional attribute in the bottom of your column of LabourCostCurrency.

    Works for me

  • Problem of page master details

    Hi all

    I have problem with the Master details page:

    If I change the catID after the connection to other ID to another user his show me the content? How can I restrict the user to see he's happy?

    Please your help as soon as POSSIBLE.

    Thank you and best regards,

    FAIZ ALI

    He solved

    That's what I did:


    <>

    Dim WebsiteName

    WebsiteName_cmd Dim

    WebsiteName_numRows Dim

    Set WebsiteName_cmd = Server.CreateObject ("ADODB.Command")

    WebsiteName_cmd. ActiveConnection = MM_mybag_STRING

    WebsiteName_cmd.CommandText = "SELECT * FROM WebName WHERE WebGroupID =?" and UserID =? ORDER BY WebNamID DESC '.

    WebsiteName_cmd. Prepared = true

    WebsiteName_cmd. Parameters.Append WebsiteName_cmd. CreateParameter ("param1", 5, 1, -1, WebsiteName__MMColParam1) ' adDouble

    WebsiteName_cmd. Parameters.Append WebsiteName_cmd. CreateParameter ("param2", 5, 1, -1, WebsiteName__MMColParam) ' adDouble

    Set WebsiteName = WebsiteName_cmd. Run

    WebsiteName_numRows = 0

    %>

    Thank you

  • Problem with application master / detail with AdvancedTable

    Hello

    We have a region of master / details in a standard way as follows.
    1. a MasterVO, a child VO, ViewLink connecting them.
    2. on the page, we have an AdvancedTable based on MasterVO and an AdvancedTable nested in a region to show/hide for more details.
    3. in the processRequest() CO, the association is defined as
    OAWebBean outerTable = (OAWebBean) webBean.findChildRecursive ("ResultsTable");
    OAWebBean innerTable = (OAWebBean) webBean.findChildRecursive ("PmtInstructionsTable");
    If (outerTable! = null) {outerTable.setAttributeValue (CHILD_VIEW_ATTRIBUTE_NAME, "PaymentServiceRequestId");
    outerTable.setAttributeValue(VIEW_LINK_NAME,"PsrToPmtInstructionsVL1") ;}
    If (innerTable! = null) {innerTable.setAttributeValue (CHILD_VIEW_ATTRIBUTE_NAME, "PaymentServiceRequestId");
    innerTable.setAttributeValue (VIEW_LINK_NAME, "PsrToPmtInstructionsVL1");
    4. When you press a button to refresh on this table, executeQuery() is called on MasterVO.
    In the test case, I change some attributes in both your. Problem here is that, after this update, the master is on the line is being updated but the detail of any line of MasterVO, is not updated DB. I confirmed this JDev logs too this detail VO query is not executed.
    It is not supposed to have the details updated through VL line?
    Try each of the following:
    a. clearCache() on innerTable
    b. executeQuery() on DetailVO during the refresh.
    c. instead of the programmatic association of the master / detail, defined the relationship of step 3

    It seems that AdvancedTable used to detail is cached information. How can this be avoided? Or am I missing something else?

    For reference,.
    CO: http://aru.us.oracle.com:8080/src/R12/120.9/ap/java/payments/psr/webui/PsrSearchCO.java & & 120.9
    VOImpl: http://aru.us.oracle.com:8080/src/R12/120.14/ap/java/payments/psr/server/PsrSearchVOImpl.java & & 120.14


    I tried to implement the various forum posts but always failed, so posting it here.

    Thank you
    Combet

    I had problems with the lines of childVO does not show correctly when you use a train, I have cleared the cache on the table with the following processRequest code

    Table OAAdvancedTableBean = (OAAdvancedTableBean) webBean.findChildRecursive ("childTableRN");
    table.clearCache (pageContext);

    don't know if this will help with your problem but if it's worth a mention.

    Bravo, Mike

  • Validation problem unique scenario master detail.

    Hello

    I have three tables involved in a scenario master / detail.  Tables A, master, detail B and C join him table for the * to * relationship between A and B.  The Association links were already in place to illustrate the relationships.  The doDml() of the main entity was substituted to support business logic. Has also been overridden preprareForDml() method.  When running the tester Application Module to test the scenario for a single validation, the following error appears:

    I use Jdev 12.1.3

    in the same way as in doML():

    http://docs.Oracle.com/CD/E12839_01/apirefs.1111/e10653/Oracle/JBO/Server/EntityImpl.html#prepareForDML%28int, %20oracle.jbo.server.TransactionEvent%29

    https://docs.Oracle.com/CD/E25178_01/Web.1111/b31974/bcrules.htm#sm0240

    but I would like to do these operations in the click on the button create/edit (before calling Commit), OR DB trigger level and then refresh the data of VO

Maybe you are looking for