Urgent !!! Master- Detail Search with Hide/Show option

Hi,
I have developed a master-detail OAF page with hide/show option.
in my searching option i have both master and detail columns.
How can i control detail level vo query.
Eg. If i pass Item no in the searching option along with customer, i sould get only that item line for that CUST.
I have created parameters in the main query and I am passing param values in a methos at AM.
When i click on Show details its throwing exception.
Can any one please help me how to acheive this. Its urgent...
Thanks,

Hi Gyan,
Thanks for your reply.
Master VO query:
SELECT qfbp.pricing_attribute_context,
qfbp.pricing_attribute,
qfbp.comparison_operator_code,
qfbp.pricing_attr_value_from,
qfbp.pricing_attr_value_to,
qfbp.adjustment_factor,
qfbp.start_date_active,
qfbp.end_date_active,
qfbp.list_line_id,
qfbp.factor_list_id
FROM qpfv_factor_base_pricing_attrs qfbp
WHERE qfbp.factor_list_id = NVL(:1,qfbp.factor_list_id)
AND qfbp.pricing_attribute = NVL(:2,qfbp.pricing_attribute)
AND qfbp.comparison_operator_code = NVL(:3,qfbp.comparison_operator_code)
AND NVL(qfbp.pricing_attr_value_from,'xxxxx') = NVL(:4,NVL(qfbp.pricing_attr_value_from,'xxxxx'))
AND NVL(qfbp.pricing_attr_value_to,'xxxxx') = NVL(:5,NVL(qfbp.pricing_attr_value_to,'xxxxx'))
AND qfbp.adjustment_factor = NVL(:6,qfbp.adjustment_factor)
Detail VO Query:
SELECT qfapa.list_line_id, qfapa.pricing_attribute_context,
qfapa.pricing_attribute, qfapa.pricing_attr_value_from,
qfapa.pricing_attr_value_to, qfapa.factor_list_id,
qfapa.comparison_operator_code, qfapa.pricing_attribute_id,
qfapa.creation_date, qfapa.created_by, qfapa.last_update_date,
qfapa.last_updated_by, qfapa.orig_sys_header_ref,
qfapa.orig_sys_line_ref, qfapa.orig_sys_pricing_attr_ref
FROM qpfv_factor_asso_pricing_attrs qfapa
WHERE qfapa.pricing_attribute = NVL (:2, qfapa.pricing_attribute)
AND qfapa.comparison_operator_code = NVL (:3, qfapa.comparison_operator_code)
AND NVL (qfapa.pricing_attr_value_from, 'xxxxx') = NVL (:4, NVL (qfapa.pricing_attr_value_from, 'xxxxx'))
AND NVL (qfapa.pricing_attr_value_to, 'xxxxx') = NVL (:5, NVL (qfapa.pricing_attr_value_to, 'xxxxx'))
Iam using view link to display master detail results in one page.
AM Code : Searcharttr method is for details VO.
public void searchparams(OAPageContext pageContext, OAWebBean webBean)
FactorListSearchVOImpl vo = getFactorListSearchVO1();
String FactorlistName ="";
String FactorListId ="";
String PricingAttribute ="";
String CompOperator ="";
String PricingAttrValFrom ="";
String PricingAttrValTo ="";
String AdjustFactor ="";
if (pageContext.getParameter("FactorListNameId")!=null&&!pageContext.getParameter("FactorListNameId").equals(""))
FactorListId =pageContext.getParameter("FactorListId").toString();
vo.setWhereClauseParam(0,FactorListId);
else
vo.setWhereClauseParam(0,null);
if (pageContext.getParameter("BaseAttrTypeId")!=null&&!pageContext.getParameter("BaseAttrTypeId").equals(""))
PricingAttribute =pageContext.getParameter("BaseAttrTypeId").toString();
vo.setWhereClauseParam(1,PricingAttribute);
else
vo.setWhereClauseParam(1,null);
if (pageContext.getParameter("BaseOperator")!=null&&!pageContext.getParameter("BaseOperator").equals(""))
CompOperator =pageContext.getParameter("BaseOperator").toString();
vo.setWhereClauseParam(2,CompOperator);
else
vo.setWhereClauseParam(2,null);
if (pageContext.getParameter("BaseAttrValueFrom")!=null&&!pageContext.getParameter("BaseAttrValueFrom").equals(""))
PricingAttrValFrom =pageContext.getParameter("BaseAttrValueFrom").toString();
vo.setWhereClauseParam(3,PricingAttrValFrom);
else
vo.setWhereClauseParam(3,null);
if (pageContext.getParameter("BaseAttrValueTo")!=null&&!pageContext.getParameter("BaseAttrValueTo").equals(""))
PricingAttrValTo =pageContext.getParameter("BaseAttrValueTo").toString();
vo.setWhereClauseParam(4,PricingAttrValTo);
else
vo.setWhereClauseParam(4,null);
if (pageContext.getParameter("BaseAdustFactor")!=null&&!pageContext.getParameter("BaseAdustFactor").equals(""))
AdjustFactor =pageContext.getParameter("BaseAdustFactor").toString();
vo.setWhereClauseParam(5,AdjustFactor);
else
vo.setWhereClauseParam(5,null);
public void searchattrparams(OAPageContext pageContext, OAWebBean webBean)
FactorListSearchVOImpl vo = getFactorListSearchVO1();
String AssoAttribute ="";
String AssoOperator ="";
String AssoAttrValFrom ="";
String AssoAttrValTo ="";
if (pageContext.getParameter("AsscAttrType1")!=null&&!pageContext.getParameter("AsscAttrType1").equals(""))
AssoAttribute =pageContext.getParameter("AsscAttrType1").toString();
vo.setWhereClauseParam(1,AssoAttribute);
else
vo.setWhereClauseParam(1,null);
if (pageContext.getParameter("AsscOperator1")!=null&&!pageContext.getParameter("AsscOperator1").equals(""))
AssoOperator =pageContext.getParameter("AsscOperator1").toString();
vo.setWhereClauseParam(2,AssoOperator);
else
vo.setWhereClauseParam(2,null);
if (pageContext.getParameter("AsscAttrValueFrom1")!=null&&!pageContext.getParameter("AsscAttrValueFrom1").equals(""))
AssoAttrValFrom =pageContext.getParameter("AsscAttrValueFrom1").toString();
vo.setWhereClauseParam(3,AssoAttrValFrom);
else
vo.setWhereClauseParam(3,null);
if (pageContext.getParameter("AsscAttrValueTo1")!=null&&!pageContext.getParameter("AsscAttrValueTo1").equals(""))
AssoAttrValTo =pageContext.getParameter("AsscAttrValueTo1").toString();
vo.setWhereClauseParam(4,AssoAttrValTo);
else
vo.setWhereClauseParam(4,null);
Iam getting below error:
Error Page
Exception Details.
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT qfapa.list_line_id, qfapa.pricing_attribute_context,
qfapa.pricing_attribute, qfapa.pricing_attr_value_from,
qfapa.pricing_attr_value_to, qfapa.factor_list_id,
qfapa.comparison_operator_code, qfapa.pricing_attribute_id,
qfapa.creation_date, qfapa.created_by, qfapa.last_update_date,
qfapa.last_updated_by, qfapa.orig_sys_header_ref,
qfapa.orig_sys_line_ref, qfapa.orig_sys_pricing_attr_ref
FROM qpfv_factor_asso_pricing_attrs qfapa
WHERE qfapa.pricing_attribute = NVL (:2, qfapa.pricing_attribute)
AND qfapa.comparison_operator_code = NVL (:3, qfapa.comparison_operator_code)
AND NVL (qfapa.pricing_attr_value_from, 'xxxxx') = NVL (:4, NVL (qfapa.pricing_attr_value_from, 'xxxxx'))
AND NVL (qfapa.pricing_attr_value_to, 'xxxxx') = NVL (:5, NVL (qfapa.pricing_attr_value_to, 'xxxxx'))) QRSLT WHERE (LIST_LINE_ID = :1)
     at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
     at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
     at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2970)
     at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2767)
     at OA.jspService(OA.jsp:41)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
     at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: ORA-01008: not all variables bound

Similar Messages

  • How to Create Master Detail Page with Query Region

    Hi,
    1. I have a requirement that i need to create a Master(Supplier) Detail(Supplier Site) Page with Query Region.
    Eg. Supplier A in Australia has Supplier Sites X in Melbourne and Y in Sydney.
          Supplier B in US has Supplier Sites C in New York and D in California.
    I need to have Search, based on two fields Supplier Name and Country
    Let us assume i am searching with Supplier Name A then the page should be in the below layout
    Query Region
    Supplier Name : A
    Country:
    Master
    Supplier Name  Country
        A                     Australia
    Detail
    Supplier Site  City
    X                   Melbourne
    Y                   Sydney
    In detail VO it should allow me to add new sites which means i need to connect this VO to database to insert new records
    I have gone few threads and understood that this can be achieved by creating SupplierVO, SupplierSiteVO and a ViewLink.
    But when tried i don't know how can i relate my query region with the Suppleir Table(Header Reagin and Table Using Wizard) and Supplier Site Table(Header Region and Table Using Wizard) i am not sure if i am correct or not, please advise
    2. Also i need to have a Open button in this page and if click the button it should navigate to some other page.
    Please help me how can i achieve this.
    - How to design my page with query region and master detail tables
    - what is the AM and CO code need to be handled
    - What is the code should i write in Open button to open new OAF page.
    Thanks,
    CSK

    Hi,
    This link will be useful for your requirement.
    Master Detail Page using Hide Show and Advanced Table inside Advanced Table - OracleArea51.com
    Let me know if you need more help in this.
    Thanks and Regards,
    Myvizhi

  • Master Detail Form with Report - Referring a column in another table

    I have master detail form with a report option. The master table has a column that also references a look up table.
    When the report is displayed the lookup column id is displayed. Rather I want to get the look-up value from a lookup table
    and display in the report.
    When I see the report region Query definition , it just has the columns to add/remove only from the master table.
    Could you pls help me with this regard.
    Eg :
    Dept Table
    dept_id
    dept_name
    location_id
    Employee Table
    employee_id
    employee_name
    dept_id
    location
    location_id_id
    location_name
    Master is Dept, Detail is dept and lookup table is location.

    Simply add the lookup table to the FROM clause and join its PK with the FK in the master table in your query. That's basic SQL, and you definitely must get a good grasp of SQL to do more than very basic work in APEX.
    For a good example, please see http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/build_app.htm#BCEBJJGB
    While you're at it, read and implement the tasks outlined in the 2 Day + Application Express Developer's Guide - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/toc.htm. After that, read the "Oracle Application Express 3.0-- Building a Functional Application" OBE in http://www.oracle.com/technology/obe/apex/obe30/apexdev30.htm - great stuff.
    Georger

  • Master detail view with drill down

    I am trying to develop a simple app for my Ipad. This app is supposed to have a Master/details look and should behave similar to the native Mail app (2x levels of navigation and the last level updates the details view).
    My problem is that I am not familiar to Apple IOS development so tend to get stuck all the time so I prefer to follow a tutorial or start with a sample project. I have searched for hours but I always either get a pure navigation drill down project without the details view or a pure master/details project with only a single level of navigation. I tried to take these projects and modify them but my knowledge sadly is very limited and I did not succeed.
    So can anybody direct me to a tutorial or a sample project where a Mail like app is being built with more than 1 level of navigation ?

    I have a GridBagLayout panel with a jtable and some jtextfield Well, we don't know exactly what constraints you have set up to its hard to say exactly why its happening.
    In general, you should create your JTextField using new JTextField(int) and I think the problem will go away.
    An easier solution would also be to use different LayoutManagers to achieve the desired layout.

  • How to implement Master-Detail Search in TopLink without using DataControl

    Hi,
    I am using TopLink and EJB in our requirement. But we are not creating any data controls. Without data controls how to implement master detail search using TopLink and EJB. I did search for a single table. It is working fine. The way i implented is as follows.
    1) Taking search parameter from UI and passing it to A delegator class's method.
    2) Delegator class's method calls the EJB's NamedQuery which i already created using expression builder.
    3) EJB executes the NamedQuery with the parameter we are passing. And it returns the results back to UI.
    But as i am new to TopLink, can anyone tell me the procedure to implement Master - Detail search. Here we need to search based on Master table's column.
    Waiting for the replies regarding this.
    Thanks & Regards,
    Suresh Kethireddy

    Hi,
    I did it successfully. Following is the code.
    Session session = getSessionFactory().acquireSession();
    UnitOfWork uow = session.acquireUnitOfWork();
    ReadAllQuery raq = new ReadAllQuery();
    Dept d = new Dept();
    d.setLoc(loc);
    raq.setExampleObject(d);
    List<Dept> res=(List<Dept>)uow.executeQuery(raq);
    for(int i=0; i<res.size();i++){
    System.out.println("Dept DeptNo ---"+res.get(i).getDeptno());
    System.out.println("Dept DeptName ---"+res.get(i).getDname());
    System.out.println("Dept Location ---"+res.get(i).getLoc());
    List<Emp> eRes=res.get(i).getEmpCollection();
    for(int j=0; j<eRes.size();j++){
    System.out.println(" Emp No ---"+eRes.get(j).getEmpno());
    System.out.println(" Emp Name ---"+eRes.get(j).getEname());
    System.out.println("Emp HireDate ---"+eRes.get(j).getHiredate());
    System.out.println(" Emp Job ---"+eRes.get(j).getJob());
    System.out.println(" Emp Mgr ---"+eRes.get(j).getMgr());
    System.out.println(" Emp Sal ---"+eRes.get(j).getSal());
    But now my question is, i want to search by providing Dept param as well Emp(Which is child table) param also. Is it possible?
    I tried in 2 ways like this.
    1) Emp emp = new Emp();
    emp.setEname(eName);
    dept.addEmp(emp);
    raq.setExampleObject(dept);
    2) Emp e = new Emp();
    e.setEname("ADAMS");
    List<Emp> list = new ArrayList();
    list.add(e);
    d.setEmpCollection(list);
    raq.setExampleObject(d);
    But in both cases i failed to search based on the values i am passing to Emp.
    Is there any other way to achieve my requirement?
    Any help on this is great.
    Thanks & Regards,
    Suresh K

  • Error while trying to search in advanced table with hide/show region

    Hi
    I have search region and a results table with a hide.show in it.I did a search initially and got the results.I clicked on the hide/show region to see the details.
    I put another search criteria in the search region and tried to do a search.
    I am getting the following error
    The search cannot be executed because the table has pending changes that would be lost...
    Can anybody help me on this please....
    Message was edited by:
    user580745

    Any setter/getter method being used on hide/show action? How are you enabling the details? Is there a transient column in your VO?
    --Shiv                                                                                                                                                                                                                                                                                       

  • Master-detail page with form layout -- insert only -- not in create mode

    JDeveloper 10.1.3.1 with JHeadstart
    I have the following master-detail structure in JHeadstart:
    Group 1, Table a, Layout: table-form
    Group 2, Table b, Layout: table-form
    Group 3, Table c, Layout: form
    Group 4, Table d, Layout: form (on same page as master table c)
    Table a, b and c are updatable (insert, update and delete).
    I have problems with the last page, tables c and d, master-datail both in form layout.
    The master-table (c) is not an insert-only table, the detail table needs to be an insert-only form on the same page as the master table c.
    Settings Table d:
    Advanced search and quick search: none
    Autoquery: disabled
    Single row insert allowed (other options in Operations disabled)
    In my view object I have used the settings in the JDeveloper guide 8.1.2 ('no rows...' in tab Tuning).
    I run my application in JDeveloper (with the option run in my ViewController-project, which means that I am not running my detail page directly in JDeveloper??) and when I open this last page, the detail form is not in create mode (I see no rows found and a create rows button).
    I have read several threads in this forum, but I do not know how to solve this problem.

    This does not work.
    In my first post I made an mistake in describing my application, it is not a table-form, but a tree-form application:
    Group 1, Table a, Layout: tree-form
    Group 2, Table b, Layout: tree-form
    Group 3, Table c, Layout: tree-form
    Group 4, Table d, Layout: form (on same page as master table c)
    If I override the executeQueryForCollection method in the ViewObjectImpl of table d I get a message ('JBO-27122: SQL-fout tijdens voorbereiding van statement' and 'java.sql.SQLException: OALL8 is in an inconsistent state').
    while clicking on the tree (with table b and c). It seems that the QueryForCollection method is being executed to early.

  • Master / Details Regions with yui Calendar

    I have a Calendar of Events that I need to display.  I have put a yui Calendar in my Master Region, and need it to control the Details Region.  I can get the Details Region to show a single event per day.
    Is there a way to let the Details Region show multiple Events if they are scheduled on the same date?
    I do not have access to an external web server to post my page to, but here is the code to the Master/Details Region on my site:
    <div id="sidebar2">
        <div id="yuicalendar1"></div>
    <script type="text/javascript">
    // BeginWebWidget YUI_Calendar: yuicalendar1   (function() {
        var cn = document.body.className.toString();
        if (cn.indexOf('yui-skin-sam') == -1) {
          document.body.className += " yui-skin-sam";
      })();  var inityuicalendar1 = function() {
        var yuicalendar1 = new YAHOO.widget.Calendar("yuicalendar1");    // The following event subscribers demonstrate how to handle
        // YUI Calendar events, specifically when a date cell is
        // selected and when it is unselected.
        // See: http://developer.yahoo.com/yui/calendar/ for more
        // information on the YUI Calendar's configurations and
        // events.
        // The YUI Calendar API cheatsheet can be found at:
        // http://yuiblog.com/assets/pdf/cheatsheets/calendar.pdf
        //--- begin event subscribers ---//
        yuicalendar1.selectEvent.subscribe(selectHandler, yuicalendar1, true);
        yuicalendar1.deselectEvent.subscribe(deselectHandler, yuicalendar1, true);
        //--- end event subscribers ---//
    yuicalendar1.cfg.setProperty("title", "Calendar of Events", false);    yuicalendar1.render();
      }  function selectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a date cell is selected.
      // alert(event) will show an event type of "Select".
      // alert(data) will show the selected date as [year, month, date].
      var formattedDateString = data[0][0][1] + "/" + data[0][0][2] + "/" + data[0][0][0];
      var r = dsCalendar.findRowsWithColumnValues({"Date": formattedDateString }, true);
      var region = Spry.Data.getRegion("classDetail");
      if(r){
       dsCalendar.setCurrentRow(r.ds_RowID);
       region.setState("showClass", true);
       } else {
        region.setState("ready", true);
      };  function deselectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a selected date cell is unselected.
      };      // Create the YUI Calendar when the HTML document is usable.
      YAHOO.util.Event.onDOMReady(inityuicalendar1);
    // EndWebWidget YUI_Calendar: yuicalendar1
    </script>
    <div spry:detailregion="dsCalendar" spry:setrow="dsCalendar" id="classDetail">
    <div spry:state="showClass">
    <table width="100%" border="0" cellpadding="1">
       <tr>
         <td colspan="2"><h4>{Class}</h4></td>
        </tr>
       <tr>
        <td colspan="2">{Description}</td>
        </tr>
       <tr>
         <td>{Location}</td>
         <td>{Date}</td>
       </tr>
    </table>
        </div>
        <div spry:state="ready">
    There are no classes on this date. Please select another date.
    </div></div>
      <!-- end #sidebar2 --></div>
    And, here is the code to my "schedule.htm" file:
    Class
    Logo
    Description
    Location
    Date
    Dreamweaver CS4 Intermediate
    Take your skills to the next level with this training.
    Austin, TX
    12/15/2008
    InDesign CS4 Advanced
    This class is for experienced users that want to go beyond the basics.
    Phoenix, AZ
    12/18/2008
    Flex CS4 Data Services
    Learn about Live Cycle Data Services in this training.
    Austin, TX
    12/19/2008
    Flash CS4 Rich Content Creation
    From beginning to intermediate, learn how to animate with the latest tools.
    Austin, TX
    12/30/2008
    Photoshop Advanced
    Experienced Photoshop users will learn how to use advanced tools for image manipulation.
    Phoenix, AZ
    12/20/2008
    Dreamweaver CS4 Intermediate
    Take your skills to the next level with this training.
    Austin, TX
    12/01/2008
    InDesign CS4 Advanced
    This class is for experienced users that want to go beyond the basics.
    Phoenix, AZ
    12/08/2008
    Flex CS4 Data Services
    Learn about Live Cycle Data Services in this training.
    Austin, TX
    12/25/2008
    Flash CS4 Rich Content Creation
    From beginning to intermediate, learn how to animate with the latest tools.
    Austin, TX
    12/26/2008
    Photoshop Advanced
    Experienced Photoshop users will learn how to use advanced tools for image manipulation.
    Phoenix, AZ
    8/21/2009
    Short Course
    Seminar where the engineers come together to discuss TxDOT.
    Austin, TX
    8/26/2009
    Long Course
    Around the cementary, down to the high school, and back.
    Wolfforth, TX
    8/21/2009
    No Class
    No classes on this date.
    n/a
    Notice on the schedule.htm file, there are some classes that have the same date.  I would like the Details region to show multiple classes based on the date.  Is that even possible?
    Thanks!

    @strick,
    Don't know if you got this sorted out already, but I'll add an answer since I looked here when trying to figure this out.
    I had the same problem.
    You can get this to do what you want in two steps:
    1.)  Just below the line in your code that reads
    var formattedDateString = data[0][0][1] + "/" + data[0][0][2] + "/" + data[0][0][0];
    add the following code:
    function myFilterFunc(dataSet, row, rowNumber)
    // Filter all rows with date = selected date
    if (row['Date'] == formattedDateString){
    return row;   }
    else {
    return null;}
    // Filter the data.
    dscalendar.filter(myFilterFunc);
    2.) Just after the line in your code that reads
    <table width="100%" border="0" cellpadding="1">
    add the following code:
    <tr spry:repeat="dscalendar">
    Ok, one last step for the code that you've listed here.  You should be able to get rid of all the <tr> tags except for the outermost ones.  So, it could
    look like this:
    <table width="100%" border="0" cellpadding="1">
       <tr spry:repeat="dscalendar">
        <td colspan="2"><h4>{Class}</h4></td>
        <td colspan="2">{Description}</td>
        <td>{Location}</td>
        <td>{Date}</td>
       </tr>
    </table>
    You can see a working example of this at http://www.coloradogreenline.com/YUISpryCalendar/sprytest6.html.  October 13, 2009 has more than one event scheduled.  This one doesn't display the data in table format, but you can still it working.
    Hope this helps.

  • Master Detail Forms with 2 composite primary keys - Is there a workaround?

    Hello All,
    I have been searching for a workaround to the maximum 2 part primary key restriction on the multi-row updates, and master-detail forms, and am hoping that someone can help me. I am using HTMLDB v2.0.0.00.49 with IE 6 against a 9.2 DB.
    I successfully implemented the workaround of Fred Stoopendaal's (see Updata PK on HTML DB ) and it works fine for single page multi-record updateable forms, but alas I haven't been able to extend it to master detail forms (I think it is something to do with Oracle not allowing the "returning" clause on views).
    Here is what I tried:
    two tables, one with a 2 part composite primary key, which is the master table, and a detail table with 3 part composite primary key -
    --------- BEGIN SQL ---------
    create table master_table
    ( master_col1 number
    , master_col2 number
    , master_col3 varchar2(30)
    , constraint master_pk primary key (master_col1,master_col2));
    create table detail_table
    (detail_col1 number
    ,detail_col2 number
    ,detail_col3 number
    ,detail_col4 varchar2(30)
    , constraint detail_pk primary key(detail_col1,detail_col2,detail_col3)
    , constraint master_detail_fk foreign key (detail_col1,detail_col2) references master_table(master_col1,master_col2));
    create or replace view v_master_table as
    select rowid mata_rowid,mata.*
    from master_table mata;
    create or replace view v_detail_table as
    select rowid deta_rowid,
    (select rowid from master_table mata where mata.master_col1 = deta.detail_col1 and mata.master_col2 = deta.detail_col2) deta_mata_rowid
    , deta.*
    from detail_table deta;
    create or replace trigger mata_ins_upd_trg
    instead of insert or update on v_master_table
    referencing new as new old as old
    for each row
    begin
    if inserting then
    insert into master_table (master_col1, master_col2, master_col3)
    values (:new.master_col1, :new.master_col2, :new.master_col3);
    end if;
    if updating then
    update master_table
    set master_col1 = :new.master_col1,
    master_col2 = :new.master_col2,
    master_col3 = :new.master_col3
    where rowid = :old.mata_rowid;
    end if;
    end;
    create or replace trigger deta_ins_upd_trg
    instead of insert or update on v_detail_table
    referencing new as new old as old
    for each row
    begin
    if inserting then
    insert into detail_table ( detail_col1, detail_col2, detail_col3, detail_col4)
    values (:new.detail_col1, :new.detail_col2, :new.detail_col3, :new.detail_col4);
    end if;
    if updating then
    update detail_table
    set detail_col1 = :new.detail_col1,
    detail_col2 = :new.detail_col2,
    detail_col3 = :new.detail_col3,
    detail_col4 = :new.detail_col4
    where rowid = :old.deta_rowid;
    end if;
    end;
    --------- END SQL ---------
    Then I created a master-detail form in Apex on the two views, using the mata_rowid and deta_rowid as primary keys, and mata_rowid=deta_mata_rowid as the link. I realise that using a function to fetch the master rowid within the detail view query is costly, but it was my intention to modify the record fetch queries to use the real FK columns once things were up and running.
    It seems to generate the pages ok, and I can insert/update master table records, but as soon as I modify records in the detail table things go a bit haywire. I can't find any documentation on how the inbuilt MRU/MRD logic works, so can't figure out the issue.
    Can anyone out there tell me what the problem is with the logic above, or if they have come up with a neat solution to this annoying limitation. I know that many will say that I should modify the data model to use surrogate primary keys, but many of the uses for HTMLDB are new interfaces for old schemas, so a workaround that doesn't involve wholesale data model changes would be preferable.
    Thanks in advance,
    Mike Cretan

    Hi, this is likely not the most elegant way...but perhaps the simplest -- and I didn't have much time to play.
    I used Wizard to create two separate Master Detail forms, each with a separate detail table. Thus I ended up with four pages:
    Page "A" - "Selector" page for Master (Report), with Edit link driving to Detail-1
    Page "B" - Editable Master/Detail-1 page (HTML / Report)
    Page "C" - "Selector" page for Master (Report), with Edit link driving to Detail-2
    Page "D" - Editable Master/Detail-2 page (HTML / Report)
    Then I selected the primary key column TWICE on the Report on Page A. Modified the second instance of this column to navigate to Page D (passing primary key) exactly the way the original instance of this column navigates to Page B. Then I deleted Page C.
    Since you can have only one Tabular Entry form per page, this seemed the best way to drive two separate detail tables from a common interface.

  • Populate row of master detail form with selection from LOV?

    Hi Guys,
    Total noobe, Hope you can help me out with a project I am working on in Oracle Apex 4.1 with 11g XE
    I am sure this is a simple enough issue but I just can’t see the solution.
    I have a table called ‘STOCK’ this contains all new parts and delivery details.
    ‘STOCK_ID’ NUMBER PK
    ‘DELIVERY DATE ‘ DATE
    ‘PART’ VARCHAR2
    ‘PART_SN’ VARCHAR2
    ‘PART_AN’ VARCHAR2
    ‘INSTALLED’ CHECKBOX
    I have a table that list all the current physical locations of hardware for example
    ID, Till number, store location etc…
    I have an table to list the devices and modification to the hardware in these store locations.
    Move Date, Device, Device Serial number, Device Asset Number, Comments
    I have a report & form that displays all the current physical locations of hardware and a master detail form linked to this to add devices and modifications to each store location.
    I have a LOV setup on the Devices column that is based on a simple select query
    SELECT PART from STOCK
    ORDER BY 1
    This provides me the list of parts in the stock table.
    What I need to figure out is how do I get the data from the ‘STOCK’ table when I select a part in the LOV to auto populate ‘DEVICE_SN’ ‘DEVICE_AN’ in my master detail tubular form. this information is contained in the 'PART_SN' & 'PART_AN' columns of the STOCK table.
    I also need to figure out how to identify the part because by default the LOV only displays one column and I have no idea which part I am selecting other than by name. i could use a popup LOV and scan a barcode into the search box and get the retuen value to display the part name in the field.
    I also would like to reduce the number of records displayed in the LOV by using the ‘INSTALLED’ checkbox i.e. if checked this part has been used and will not be available for selection. The ‘PART_SN’ field can be duplicated as we often get the same part back again as a replacement after repair but this should be valaditated against i.e if the parts is ticked as installed and not available for selection in the list it can be added again this could possibly be validated based on the ‘DELIVERY DATE‘?
    I hope this make some sense to you guys if you need any further details let me know.
    Cheers
    Darren

    Hi,
    I am from the Oracle Forms background too and I have been using Oracle Apex for a while. Oracle Forms is just like client-server application although it uses the Forms servlet to render its Web front-end. I think...if you're really trying to develop true-Web application, you should try to forget such features as "master with many details" in Oracle Forms. Loading all the details in a single page will cause overheads anyway. When you discover more about ajax and such third-party javascript libraries as jquery and mootools, you'll have a different mind of Web development.
    Thanks.
    Andy

  • Master-Detail Search

    hi all,
    I need to know how to add search to a table in the master and the detail.
    in one table just add from data control and select the Filtering, how can i add this to a master and detail tables???
    i have added the searchRegion in the page definition and filterVisible="true" in the source of the jspx, i did just like the simple one table, in the design its appear but in the running nothing appear ????
    any help, its very important issue???

    i have two tables at the database
    such as department and the employee
    at the data control>applicationModule
    drag the employee which is a detail of the department, and then choose the master detail its will create two tables and works very good, but i want to add a search in the above for both exactly like when i choose one table (no master detail) and when add the department its show that the columns i want to add and the filtering and the sort ...etc, this will show the table of the department and above every column the field for the criteria
    how can i add this the fields above the column for the master and the detail .......

  • UIX Master-Detail search criteria

    When dropping a data control, Drag and Drop As Master-Detail, into a UIX page it wires up search inputs for Master data attributes only. Is it possible to include or define search inputs for detail data attributes? If so, please can you show me how to do it and provide an example if possible?

    what do you mean by
    " it wires up search inputs for Master data attributes only"?
    No search form inputs are created by default when you drag'n'drop a master-detail widget.

  • Creating master details application with views!

    Hi All,
    I have a requirement to create the master details with the views, but when I was trying to create the master details its asking me for Master Table name & detail table name. Here I am giving the master table name in place of detail table name I am using view but its not showing my view in query builder, my view is already there in the database
    any idea why its not showing my view?
    Thanks,
    Suma.

    Hi Claudia,
    I am so sorry, but I do not check the Oracle forums every day. I am under presser, because have to relocate from Bulgaria to the USA through the end of November.
    Shortly, any view could be updatable under many restrictions. I suppose, that is the reason for the errors. I don’t know what kind of connection you have between those two tables.
    Under all these circumstances, I’ll offer you to build first a form on the base of the first table which all columns are used. Then you can test, refine, and finish all details about it.
    Second, you can Create Page Computation retrieving the column (value, if any) from the second table.
    Third, you should Create Page Process on Submit of type “PL/SQL anonymous block”, which will INSERT the calculated (entered) value into second table.
    You gain:
    1. Full power of ApEx to build automatically forms and reports.
    2. Min. manual work.
    3. You can use the select statement from the view to build your SQL query.
    4. You are able to build and test that part of the application step by step.
    Konstantin
    [email protected]

  • Can I set up a Master-Detail Page with report regions for 2 Detail Tables?

    Hi there,
    I am just starting to use Application Express.
    I have a Table (A) with Master-Detail relationships to two Tables B & C.
    I can set up a Master-Detail Page between Table A and Table B, where the records displayed in Table B change when switching between records in Table A. I would like to add Table C to the page and for this to work in the same way.
    Is this possible in APEX? (I've tried adding a report region for Table C and making the Region Source dependent on the same ID field as is used by the report region for Table B but I keep getting "No Data Found" for Table C).
    Many thanks.

    Thanks, but the text needs to be on a single master page which every page is assigned to. This is so the text alternates correctly regardless of whether new pages are inserted or moved. If I assigned separate master pages to individual pages and then moved the pages to a different location, the alternating footer text would then fall out of sync. I hope that made sense!

  • Master/Detail form with modal edit

    I have a master/detail form that I generated using the wizard that I want to change to have a modal Edit button; i.e. the behavior I want is that the form view is initially read-only and you then have to click an Edit button to make the form editable.
    I figured out how to do this for the master row by making the edit button redirect back to the same page with the request set to 'EDIT' and then making all the page items read-only with a condition REQUEST <> 'EDIT'.
    I cannot find a good way to do this for the detail rows, which are actually a report with editable columns. The problem is that the 'Tabular Form Element' section of the 'Column Attributes' page does not have a read-only condition.
    The only work around I can come up with so far is to have a second read-only report region with the same SQL query and then display either the editable or non-editable report region conditionally depending on whether the request is EDIT. But this obviously not ideal (having same SQL in two places, etc.).
    If anyone can think of a better way to do this, I'd be grateful.
    HTML DB Team: Can you log the addition of a read-only condition attribute on editable report columns as an enhancement request?

    Simply add the lookup table to the FROM clause and join its PK with the FK in the master table in your query. That's basic SQL, and you definitely must get a good grasp of SQL to do more than very basic work in APEX.
    For a good example, please see http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/build_app.htm#BCEBJJGB
    While you're at it, read and implement the tasks outlined in the 2 Day + Application Express Developer's Guide - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/toc.htm. After that, read the "Oracle Application Express 3.0-- Building a Functional Application" OBE in http://www.oracle.com/technology/obe/apex/obe30/apexdev30.htm - great stuff.
    Georger

Maybe you are looking for

  • No of entries in a table

    Hi, Is there any table which has says the a particular table has got any data or not? i.e  if I pass the table name in that table it should say whether that table has got any data in it or not. Hope my question is clear. Regards, krishna

  • ITunes has deleted 1,500  songs off my iTunes library, how can I get them back?

    I left my iTunes library opened, when I came back there was a message saying that icloud had been activated and my music had stopped. Then all my music had disappeared except for the ones which I've purchased off iTunes, this being a small minority o

  • A simple question about Oracle 11g ODAC  XCopy version

    There is no oracle client on my machine , I have seen Oracle 11g ODAC XCopy version on http://www.oracle.com/technology/software/tech/windows/odpnet/index.html its size is only 43m , quite small,what i want to know is : Do i have to install any oracl

  • Auto-capitalize form input

    Hi all, I've been seeing forms popping up here and there that auto-capitalize a user's input.  What I'm trying to get my form to do is capitalize each new word in a form field.  For example, instead of Firstname lastname, I'm going for Firstname Last

  • ADF UI is not reflect the ADF view updated values.

    Hi Expert, I have a ADF fusion web application using the ADF-BC. In that one of the View is created using the SQL query (refer the database base view in the back ground). I have some operation in the model layer. The operation updated the records so