Apex 2.1 (XE) Master/Detail Page Question Regarding Prev/Next Buttons

When creating a page of type master/detail the master form is auto-populated with two buttons that allow the user to navigate to the previous or next record. These buttons are implemented as submit buttons, which cause the session variables to be updated with the current form values prior to moving to the previous or next record. But no database update happens because the buttons have matching before computation branches that reload the current page. It seems to me as if these buttons should have been implemented as URL redirects so as to not cause the session variables to be updated, especially since they are being updated to values that will not match the newly displayed record. And another problem is that any user changes to items on the form get picked up by the page navigation submittal and are stored into the session's item variables, yet are never persisted to the database. When code on other pages use these item variables, you can get some strange results because of this.
My current workaround is to store each displayed item into the session during the display of the page (during the rendering phase) using the htmldb_util save_session_state function. This effectively overwrites any errant data in the session variables with what is actually being shown on the screen. (As an aside, if anyone has a better way to cause all the session variables to be updated during the fetch and page rendering step, please let me know, otherwise I will continue hand coding the save_session_state for each item in an anonymous PL/SQL block).
Ultimately I was wondering if anyone else thought these two buttons should have been implemented by the Apex designers as URL redirects, rather than submit buttons? This would have kept the session data update from happening. Or is there a good reason to have these buttons submitting that I haven't been able to figure out?
Thanks in advance for any thoughts on the issue.
- Jim

Is a before insert trigger not more interesting and safer in your use case?

Similar Messages

  • Question on "Master Detail page using ADF" sample

    I downloaded the "Master Detail page using ADF" sample application. I modified editDepartment.jsp page to include the Commit button as follows:
    <html:submit property="event_Commit">Save and Commit</html:submit>
    When I go to edit a department record and click on the new "Save and Commit" button, I SQLed the DEPARTMENTS table and noticed that the edits were not commited. I also restarted the embedded OC4J server and still get the same results. For some reason, the department view object contains the modification but the entity object doesn't. Why?

    Scott,
    My colleague suggested a workaround, which is to explicitly include the detail table's id in the master table's partialTargets list. So, for example, in MasterDetailDP.uix, changing:
    <table model="${bindings.DepartmentsView1}"
           id="DepartmentsView111"
           partialRenderMode="multiple"
           partialTargets="_uixState">to:
    <table model="${bindings.DepartmentsView1}"
           id="DepartmentsView111"
           partialRenderMode="multiple"
           partialTargets="_uixState EmployeesView312">...will cause the detail table to be updated when sorting the master table.
    There is some question about whether sorting a table should actually cause the currently selected row to change - we're still discussing this point.
    Andy

  • APEX 4.0.2 Error on Master Detail Pages - 'length' is null or not an object

    Greetings,
    We just upgraded to APEX 4.0.2.00.07 this past weekend. Now a JavaScript error occurs when Master Detail pages are opened in IE 8. The error is - 'length' is null or not an object. I do not have a page item named length on any of these pages.
    The error does not occur in Chrome or Firefox, but the Add button on the detail portion of the page simply doesn't work.
    The page works when creating the master portion of the page. After the master row is created the region to add detail rows appears and the error occurs. So, the error appears to be with that part of the page.
    We use an Inactive Date column to soft delete rows in the detail portion of the page, so the detail regions have a date column, just in case this column is the problem.
    Does anyone have an idea what the problem might be?
    Thanks, Tony

    I too had this same problem and determined that the problem was due to a missing underscore character between the literal "report" and the report Id in the report template.
    I guess some themes include this underscore and some don't.
    I had to debug the apex_4.0.js to determine this - not easy as it's not nicely formatted.
    It only seems to stop Pagination working in an Updatable Tabular Form Report.
    Edit the Report Template. Go to the "Before Rows" region and edit the Before Rows text box. Locate where it defines the report id and insert an underscore between report#REGION_ID#
    Previous
    &lt;div id="report#REGION_ID#"&gt;
    Fixed
    &lt;div id="report_#REGION_ID#"&gt;

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • 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!

  • Spry Tabbed Panels and Master/ Detail Page Set interraction

    Hi,
    I have created a feedback form and am using a Spry Tabbed Panel to allow users to review all responses to one question and then all responses to the next question in different tabs, there are 6 tabs in all. In each tab I have created a Master/ Detail Page set - well actually just the Master appears in the tab. This is working fine. I allow up to 20 responses to be shown on each tab, after which the user selects First/Previous/Next/Last. When they do this the screen refreshes and the tabbed panel display goes back to the default tab, clicking on the tab previously used correctly displays whichever of First/Previous/Next/Last the user selected. I'd like the display to remain on the user's current tab when they select First/Previous/Next/Last.
    The page in question is here http://www.hollisterairshow.com/feedback-results2.php, then scroll about half way down the page and select one of the tabs.
    Thanks.
    Tony

    Hi Tony,
    Look at the following, blue coded is comment only, red coded is what has to be added to your existing code and orange coded is added by the SpryDataSet creator if done properly. Where the orange part starts, thats where you place your cursor when creating the dataset.
        <p> </p>
       <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">All feedback</li>
            <li class="TabbedPanelsTab" tabindex="0">Suggestions for improvement</li>
            <li class="TabbedPanelsTab" tabindex="0">What did you like the most</li>
            <li class="TabbedPanelsTab" tabindex="0">What did you like the least</li>
            <li class="TabbedPanelsTab" tabindex="0">What else would you like to see</li>
            <li class="TabbedPanelsTab" tabindex="0">Any other comments</li>
          </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">
              <table border="1" align="center" id="allFeedback"> .... start feedback table tag (line 763)
                <tr>
                  <td width="80"><strong>Feedback Number</strong></td>
                  <td><strong>Days attended</strong></td>
                  <td><strong>Arrived by</strong></td>
                  <td><strong>Arrival arrangements</strong></td>
                  <td><strong>Expectations met</strong></td>
                  <td><strong>Ticket price</strong></td>
                  <td><strong>Zip code</strong></td>
                </tr>
    .................... rest of table probably your PHP repeat area
                  </tr>
              </table> .... end feedback table tag    
              <div spry:region="dsAllFeedback">
                <table>        
                   <tr>
                    <th spry:sort="Feedback_Number">Feedback Number</th>
                    <th spry:sort="Days_attended">Days attended</th>
                    <th spry:sort="Arrived_by">Arrived by</th>
                    <th spry:sort="Arrival_arrangements">Arrival arrangements</th>
                    <th spry:sort="Expectations_met">Expectations met</th>
                    <th spry:sort="Ticket_price">Ticket price</th>
                    <th spry:sort="Zip_code">Zip code</th>
                  </tr>
                  <tr spry:repeat="dsAllFeedback" spry:setrow="dsAllFeedback" spry:odd="row_odd" spry:even="row_even" spry:hover="row_hover" spry:select="row_select">
                    <td>{Feedback_Number}</td>
                    <td>{Days_attended}</td>
                    <td>{Arrived_by}</td>
                    <td>{Arrival_arrangements}</td>
                    <td>{Expectations_met}</td>
                    <td>{Ticket_price}</td>
                    <td>{Zip_code}</td>
                  </tr>
                </table>
              </div>
              <br />
              <table border="0">
    I hope this helps.
    Ben

  • Spry Tabbed Panel and Master/Detail Page Set interraction

    Hi,
    I have created a feedback form and am using a Spry Tabbed Panel to allow users to review all responses to one question and then all responses to the next question in different tabs, there are 6 tabs in all. In each tab I have created a Master/ Detail Page set - well actually just the Master appears in the tab. This is working fine. I allow up to 20 responses to be shown on each page, after which the user selects First/Previous/Next/Last. When they do this the screen refreshes and the tabbed panel display goes back to the default tab, clicking on the tab previously used correctly displays whichever of First/Previous/Next/Last the user selected. I'd like the display to remain on the user's current tab when they select First/Previous/Next/Last.
    The page in question is here http://www.hollisterairshow.com/feedback-results2.php, then scroll about half way down the page.
    Thanks.
    Tony 

    Hi Tony,
    Have a look here http://labs.adobe.com/technologies/spry/samples/data_region/PagingSample.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
    If you need further assistance, go to the Spry Forum http://forums.adobe.com/community/labs/spry
    I hope this helps.
    Ben

  • How to dynamically disable interactive report filed in master detail page

    I am using APEX 4.0 & very new to APEX. I am not able to make disable a filed in detail region (which is a interactive report) of a master detail Page.
    I.e. want to disable field of a row based on value of another field for same record, just like set_item_instance_property of oracle forms. Please help me out.

    its working fine for tabular form. But not working for master detail form (for detail section). Can you please help me out

  • ADF: Master Details Page

    Hello,
    I have just started out trying to develop an application in JDeveloper with ADF and I am coming from a Apex/Forms/PL SQL background. I am trying to develop an online application form for our Grants program.
    The problem I am having is I have a master detail type page where I have a section D (Master) and then I have a breakdown of cost (detail). I have created a creation page for the section D and I have then another creation section on the same page for the breakdown of the costs by dragging the view that is under the section D view.
    The problem is the detail section seems to be bring back the first record from the table. This is not what I expected as I would assume this to be blank record as we have a blank record in the master part.
    Is there anyway around this where on startup the detail section brings up a blank record instead of the first record in the view?
    Cheers in advance in any help on this matter.
    Paul.

    Most likely you dragged the wrong detail structure from the Data Control palette. When you created your Application Module, and added View objects to it, you would have seen a tree structure. Views will be listed separately, but if you have a View Link associating a detail view with its master, you will also see that view in the tree under the master. Something like this:
    MyMasterView
      MyViewLink
        MyDetailView
    MyDetailViewMake sure that this structure has been moved to the right side of your Application Module. There you will see something like:
    MyMasterView1
      MyDetailView2
    MyDetailView1This is what creates the tree structure in the Data Control palette. When you created your master/detail page, you dragged MyMasterView1 for the fields from your master view. But you probably dragged MyDetailView1 for the details. This does not use the View Link to associate your details with the current master record. To do this, you must use MyDetailView2, which you will find by expanding the tree under the master.
    Now, to get a blank record in the detail, you have to execute a Create action from that data control. You can drag a Create button to the page, and the user can press the button to get a blank record. Or you can cause a create action to happen whenever you enter that page.

  • Linking JSP master-detail pages

    Hi all,
    I am developing a JSP-BC4J application with JDev903.
    I have a hierarchy of 5 view objects, let's say VO1,..,VO5, linked to each other by one-to-many view links. I would like to make a drill-down for this data.
    With the JSP for BC4J wizard, I generated an JSP application, which contains (among others) 4 JSP master-detail pages:
    - VO1 DataRecord with VO2 DataTable
    - VO2 DataRecord with VO3 DataTable
    etc.
    In the DataTable's, I added the next master-detail page as an edittarget. If you click it, the next page appears, but the data on this page do not correspond with the master table row that you clicked. So probably, you have to add some extra code to synchronize the row sets.
    My questions:
    - how can you get this to work ?
    - what is the best place to change things ?
    - does anyone have an example of this ?
    Cheers,
    Frank

    As long as you add ViewLinks between your master-detail levels, the synchronization is automatic. You just have to make sure you use the 'correct' view object usage name. Look at your ApplicationModule's model via its editor.

  • Master & Detail Pages

    Hello all,
    I am asking for help on creating Master - Detail pages. I am using Wamp version 2. Database name "TestingCo" with 3 tables:
    Users:      user_id                int(4)           Primary_Key
                   user_fname          varchar(30)
                   user_lname          varchar(30)
                   user_license_id    int(4)
                   user_pix_id          int(4)
    Licenses: license_id           int(4)             Primary_Key
                   license_no          varchar(10)
    Pictures:  pix_id                 int(4)             Primary_Key
                   pix_url                varchar(50)
    1. I create a recordset called: rsMasterDetail:
         * with all fields from all 3 tables.
         * Where users.user_pix_id = pictures.pix_id AND users.user_license_id = licenses.license_id
         * Order By users.urser_fname
    2. On Master page, I insert Master Detail Page Set:
         * Master page fields: All fields from rsMasterDetail recordset.
         * Link to Detail from: user_id          / later I tried: user_fname         
         * Pass unique key:   user_id          / later I tried: one by one from each field of Users table.
         * Show: All records
         * Detail page name:     Detailpage.php
         * Detail page fields:     All from rsMasterDetail recordset.
    3. Result: (I always get the same result as below).
         * Masterpage.php - perfect - All correct display between 3 relational tables
         (*) Detailpage.php - when I click on any link from the Masterpage.php:
              - All the fields from Users table are displayed correctly depending on which link I clicked on Masterpage.php
              (+) The fields from table Licenses are displayed the first row only (1st record of the table.)???????????????
              (+) The fields from tabel Pictures are displayed the first row only???????????????
    A. When I built the rsMasterDetail recordset, I test it and the result is good.
    B. The masterpage.php shows all fields in perfect order.
    There must be something wrong when the information passes from Master page to Detail page!??!!???
    Please help me!
    Thank you

    Hi Lon,
    When I test it, the tables relationship is perfect since all three tables line up correctly on the masterpage.php. If there is problem with tables relationship, I should also have such problem with the masterpage.php.
    I, once tried to build another recordset called: rsTest. This time I had only 2 tables: Users and Licenses. The result was the same; only the first row of the licenses table would show on the detailpage.php; while the masterpage.php the rows on both tables line up correctly.
    I have tried many ways to find solutions unsuccessfully. What I get so far is:
    * The recordset is display correctly every single time when I click the "Test" button, as well as on the masterpage.php (I meant the tables relationship).
    * When the link on the masterpage.php is clicked, the detailpage.php supposes come up and display all rows of 3 tables of the linked record. However, all rows of the 1st table are correctly displayed, and the other table(s) only show its first row regardless which link on the Masterpage.php was clicked.
    I hope you and others gurus can help me out.
    I appreciate your help.

  • Refresh problem by combination of programmatic view and master-detail page

    I am using the latest versions of both ADF (10.1.3.2.0.4066) and JHeadstart (10.1.3.1.26) and I have an application with 1 page in which I have as root page a programmatic view (table-form) which I fill with request parameters.
    Under that programmatic view I have a master (table) with 3 detail pages (table).
    The programmatic view is populated with always 1 row, which goes always correct.
    The problem is occuring when iterating through the first entity based master table which contains lots of rows. Then the problem is that when you navigate through the master table the detail pages are refreshed correctly, but when you navigate back to the first row that row won't get updated.
    The next thing I tried is create a new jheadstart application with only the master-detail pages (entity based), so without the programmatic view, and then the iterating through the master table and the refresh of the child tables is working correct.
    What can be the problem here.

    Have you tested this in the ADF Business Components Browser? That's the tester that you can find by right-clicking your ADF BC Application Module and choosing Test. If you go to the View Object instance for the programmatic view, and using the ViewLinks to its children, do you get the same behavior as in the JHeadstart application?
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Master-Detail Form Questions

    Master-Detail Form Questions
    I have two questions in regards to master-detail forms:
    First, the form I am working on has 25 detail rows displayed to the user. If the user has more than 25 detail records for the master, I want them to be able to add more. For instance, after they enter the 25th record, I would like a pop up window to ask them if they would like to add more detail records for this master. If they select yes, then the records they have entered would be saved and then the form would repopulate with the current master record and another empty 25 detail records.
    Second, I would like the Detail Action to be set to Insert if the user moves to a new detail row and selects an item from a combo box.
    Thanks for any and all help.
    Jeremy.

    Hi Sharmila.
    Is there a way to repopulate only the Master information without populating the detail after the 'Save' button is pressed? I have written code that uses the session variables and repopulates the form with all the data that has just been saved, but I need only the master without the detail.
    Thanks.

  • Master / details pages set in a .htaccess protected directory

    Hi
    I am using Dreamweaver CS4 functionality to create a Master/Details page set. I have done this many times before without a problem, however, i am now trying to create the master / detail page set in the members area of a web site. The directory that contains both the master and the details page is .htaccess protected which means that the master page works fine but the details do not get passed to the details page. The details page remains blank where the echo statements should be. If i copy  the exact same master and detail pages and then paste them in to an unprotected directory the pages work fine and the details are passed from the master to the details page without a problem.
    I have been unable to find any information on this so any help would be gratefully received.

    I'm not using secure access (https). I started with the most basic configuration, standard http: on port 80, etc. The configuration works perfectly fine when tested on my home PC. The problem seems to be in Safari on the iphone it prompts me for a login, and accepts it.. then it fires up the media/movie player and I'm guessing it's not passing the authentication/credentials/whatever to the movie player. When the media tries to play, it notes it's an access controlled file and just quits out. The movie player doesnt seem to allow asking of login/password info. Thoughts??

  • Master Detail Page

    Hi,
    I'm new at JDeveloper (using it for 3 weeks now), and I need some assistance in a little problem that I have. Let me give a description:
    I need to develop a master-detail page (I've tried several examples that I've found in this forum and blogs, but I can't seem to put it right), with a little difference from the usual. Let me start by describing my problem:
    I need to develop a Master-Detail page with a little information form on the top, and a Master-Detail Table on the bottom. There will be 3 tables related in this page, let's call it Table Emp, Table tabMaster (Master), Table tabDetail (Detail). The following information can be useful:
    Cardinality : Emp 1 - * tabMaster
    tabMaster 1 - * tabDetail
    The information form will be populated by a query that will execute on Emp, with a Emp.Id received by (for example) sessionScope. With this same Emp.id received by sessionScope, e need to develop a Master-Detail Table based on tabMaster and tabDetail. With this same Emp.id, I will query tabMaster to show the items related with Emp. The tabDetail will show the items related with tabMaster selected item.
    I'm sorry for the trouble, but I'm around this problem, for quite some time, and I've tried almost anything I can remember (since, invokeAction, viewlinks, you name it...).
    Thanks in advance
    Tiago Soares

    Hi,
    try the following
    1. drag and drop the form on top
    2. drag and drop the dependent master view as a table
    3. drag and drop the dependent detail table
    4. Add an ID to the buttons that force a currency change on the top form
    5. Select the table components and put in all the IDs as the value for the PartialTrigger property
    This will ensure the tables are getting refreshed when the form changes
    Frank

Maybe you are looking for

  • How do I transpose and group a table in a ViewObject?

    Hi, I want to transpose and group a table within a view object and don't know how to do it. Please let me explain what I want to do: One table, e.g. Employees, has one row per employee. Each employee has a departmenent and a room assigned: Employee D

  • Audigy 4 Pro Hub Analog inputs problem

    &Analog inputs in Audigy 4 Pro external hub seem to be unsupported in Windows 7. Am I wrong? I installed latest drivers, set mixer to monitor sound from line in, also tryed win ASIO, but I am unable to get any sound from Line in/Mic in. Please help m

  • Java plugins not working

    I have an iMAc and use iOS X Lion 10.7.5 I have a with (Java) plugins being blocked (in Safari and also in Firefox). When trying to test if Java is up to date by using the official test www.java.com/nl/download/testjava.jsp  I already get the message

  • My libraries panel is missing from the window dropdown. Where else can I access it? Is that normal?

    My libraries panel is missing from the window dropdown. Where else can I access it? Is that normal?

  • PR release procedure

    Hi,experts Good Sunday. I finished the configuration of PR release procedure,but it is not effective as I created PR. My scenario of PR release procedure: 1) Create two characteristics Z_WERKS,Z_GSWRT mapped by CEBAN-WERKS and CEBAN-GSWRT. 2) Create