Master-detail table where detail is in a bounded task flow

Dear all,
Iam pretty much new to ADF 11g. I have the following question.
I have a search form(using af:query) created from the View Criteria of a view. The search results are displayed in a master-detail table, since my view has the following form in the data control:
MasterView ->DetailView
I would like that the detail table be part of a page fragment of a region of a bounded task flow. And of course, the detail table should be refreshed every time another row is selected in the master table.
Is this feasible? Because I find difficulties in the following areas:
1. How to pass a parameter to the bounded task flow that will display the detail table?
(I suppose that I will need to build a new view to display the DetailView. In the WHERE clause I will have to pass the id of the row clicked in the master table.
2.How passing the variable to the bounded task flow of the detail table be implemented when clicking the row of the master table? In similar examples I have seen, e.g. in the ADF Code Corner, there is always a submit button that sets a pageFlowScope variable.
Is my approach feasible or it needs a lot of ADF twisting?
Edited by: dimitris74 on Sep 12, 2011 6:20 AM

Hi,
If you have two different regions in your page for master and details and you want to refresh the child table based on your master row selection then you can use the contextual actions. Raise an event whenever you select a row and send your master-table id as the payload. Have a handler method at the detail page and execute some logic to get the rows for the selected master record.
I hope it helps you.
Thanks,
Lakshman

Similar Messages

  • Where should backing bean for bounded-task-flow be declared?

    I have a bounded-task-flow that is used inside a dynamic region.
    I declared a managed bean to be used by activities (method/view) using the "backingBean" scope managed bean.
    There are two possible places that I can register the managed bean:
    1. adfc-config.xml
    2. the bounded-task-flow-definition.xml
    What are the differences between declaring the "backingBean" scope bean in "adfc-config.xml" and in the bounded-task-flow definition?
    What is the best practice for registering "backingBean" scope bean?
    If I understand correctly, registering the bean in adfc-config.xml is for one or more bounded-task-flow that use the same Bean class for instantiating their own backing bean. If the backing bean java class is only use by specific bounded-task-flow then it should make no difference to register the bean in either xml files.
    Am I correct?

    It should be registered within the bounded task flow for a couple reasons:
    1) Help maintain the encapsulation of the bounded task flow for reuse
    2) Managed bean definition metadata residing in adfc-config.xml or bootstrap configuration file will be preloaded when the ADF application is started. The actual managed beans will be instantiated the first time they are referenced. Therefore, to avoid the preload place them in the bounded task flow.
    thanks.

  • Matser Table/Detail Table -- Hide detail panel when no row

    Hi,
    I would like to hide the detail panel when the user selects a row in the master table without detail.
    I try to put something like this:
    <af:panelHeader
    rendered="#{bindings.MyView2.estimatedRowCount>0}">
    But it does not work, instead the previous detail rows are display when there is no detail rows for the master row.
    I need to to press a button <af:commandButton text="Apply change"/> , to render the page correctly.
    The selection facet used in the master table is defined as follow:
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"></af:tableSelectOne>
    </f:facet>
    Where am I wrong, it is my first project with ADF ?
    Any help will be appreciate,
    Thanks,

    Well not really clear if it's a bug or not, but here's two workarounds:
    1- the table is surrounded by a panelCollection, if we add a partial trigger from the panelCollection to the table, on every change of row selection the table refreshes itself.
    2- The second option was to remove the primary keys from the entity, and force it to use RowId as the primary key.
    This is such a weird behavior in ADF, it's one of the basic things that one will do in an application. We tried to do a test on a smaller app and it gave the same results.
    Here's the scenario:
    Master/detail linked by two keys
    Master PK (key1, key2)
    Detail PK (key1, key2, key3) => key1 and key2 are the link between the tables.
    If anyone can reproduce this and confirm if it's a bug, it would be greatly appreciated.
    Mo

  • Master details tables and no xml data source

    Hello
    I want to create mater - details tables where details table will be repeated for each master row.
    So i created master table and placed detail table into master table cell.
    so what i want to have
    product1 quantity
                              - item1
                              - item2
    product2 quantity
                              - item3
                              - item3
    for now i have
    product1 quantity
                             - item1
                             - item2
                             - item3
                             - item3
    product2 quantity
    here is how i fill the table
    for i in 1..5 do
                ("Cell1r", "quantity" + i.ToString())
                ("Cell2r", "product" + i.ToString())           
            ] |>p
            for j in 1..2 do
                        ("Cell11", "product" + i.ToString())
                        ("Cell21", "serial" + j.ToString())
                        ("Cell31", "function" + j.ToString())
                    ]|>p
    i found an axample how to do it from xml data sourcem but have no idea and did not find how  to do it manualy(when i bing by name from code dynamicaly)

    i found hot to do it with xml source
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000241.html
    but how to do it manualy ?

  • Polling the master detail table and to update the LAST_UPDATED with SYSDATE

    Hi
    The requirement is polling the master detail table where read_flag is null and has to update the LAST_UPDATED with SYSDATE in both tables.
    Refered the MasterDetail and PollingPureSQLSysdateLogicalDelete samples of SOASuite.
    Used the delete polling strategy in polling process and modified the generated TopLink discriptor as follows.
    set the TopLink -> Custom SQL tab -> Delete tab with the following query
    for master table (RECEIVER_DEPT) :
    update RECEIVER_DEPT set READ_FLAG= 'S' , LAST_UPDATED=sysdate where DEPTNO=#DEPTNO
    set the TopLink -> Custom SQL tab -> Delete tab with the following query
    for Detail table (RECEIVER_EMP):
    update RECEIVER_EMP set LAST_UPDATED=sysdate where EMPNO=#EMPNO
    After deploying the bpel process data is updated in master(RECEIVER_DEPT) table with LAST_UPDATED as sysdate and read_flag as S
    however data is deleted in detail(RECEIVER_EMP) table rather than updated records.

    Xtanto,
    I suggest using JSP / Struts. UIX will be replaced by ADF Faces in JDeveloper 10.1.3 and thus I wouldn't suggest new developments to be started with UIX unless time doesn't allow to wait for ADF Faces. In this case develop UIX in an MVC1 model, using the UIX events for navigation because this model seems more likely to be mgratable, according to the UIX Statement of direction on Otn.
    Back to your question. You can create a search form in JSP that forwards the request to a StrutsData Action to set the scope of teh result set. The read only table can have a link or a button to call the detail page, passing the RoewKey as a string.
    Have a look at the Oracle by Example (OBE) tutorials that contain similar exaqmples.
    Frank

  • ADF Faces Query Panel: How to display master data in detail table?

    Before stating the question, here is the background:
    I've a Fusion ADF (model/viewController) app that includes 2 tables with a master-detail relationship. The master table stores error numbers and associated levels of logging severity; the detail table stores the actual message text. These need to be separate, related tables because the requirement is that message text for a given error number can vary by product release.
    Messages are added in a bounded task flow; data for the master table entered in 1 fragment, data for the detail table in a 2nd page fragment. In the app, the Entity Objects for these tables are related with a foreign key association and have a composition association. This was done because the error numbers are generated in an Oracle DB sequence, and from what i have read that is a way in a task flow to have ADF put the number generated for the master table into the related key of the child table.
    The question is this:
    I need to create an ADF query panel with a table that searches on the detail DB table. However, i also need to use a couple of fields from the master DB table in both the query and in the ADF table. In addition, I need to add the ability for the user to edit either the master or detail record for the row he/she selects in the ADF table. I know how to create a view that would display the info i need; however, i have not been able to figure out how to obtain the keys for the selected ADF table row and pass them to the task flows that would edit.
    The master table has a numeric primary key. The detail table primary key consists of a foreign key to the master key and also a release number.
    I'm new to ADF and have been struggling with how to do this: i've a workaround that is functional but too klunky to be a permanent solution. So, could someone point me to some information on how to accomplish this?
    Versions: JDeveloper 11.1.1.4, ADF Business Components 11.1.1.59.23
    Thanks for your help!

    Thanks. I tried this out, but ran into an issue in that the detail table has 2 keys - a foreign key to the master primary key, and a 2nd key that uniquely distinguishes the detail. So i tried various things centered around using the SetCurrentRowWithKey operation and trying to obtain the selected ADF table row using an EL OF #{data.<pageDef>.<Iterator>.currentRowKeyString}; however i could not get the detail record for the selected row to display.
    I did find another approach that worked - I am wondering, is there anything problematic with this approach?:
    1. Create a VO joining the Master and Detail tables, with the Detail table being updatable.
    2. Made sure the applicable attributes were defined as keys.
    3. Add a query panel w/table using this VO.
    4. Create an ADF form based on the VO, showing the updatable fields.
    5. Create a bounded task flow with the following set on the Behavior tab:
    a. Share data controls with calling task flow
    b. Always Begin Transaction
    I specifically am wondering whether "Share data controls with calling task flow" has any negative implications or gotchas to handle. The doc at http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/taskflows_parameters.htm#ADFFD1693 doesn't suggest so, but just wanted to double-check before I go down this path.

  • Master Detail - Insert in Detail Table is not Working

    I am using Jdeveloper 11.1.2
    I have a very simple Master Detail Page with Masster Form and Detail Table. I have used Page fragments and called it from DynamicTab Shell. If I click on the button of CreateInsert Row in Detail Table, the detail Table stops rendering.
    If I use the same in a JSPX page it works fine but not in page fragments which I call in from DynamicTab Shell.
    The same forms worked well in JDeveloper 11g PS4 - 11.1.1.5.0
    Any help please ?
    Edited by: user465666 on Aug 9, 2011 6:35 PM
    Edited by: user465666 on Aug 9, 2011 6:40 PM

    Please explain clearly your problem

  • Af:table filter date format : task-flow navigation issue

    hi
    When trying to use the date format configured on the Entity Object, with Format Type as Simple Date and Format as "dd-MM-yyyy", there seems to be a problem when using task-flows.
    The approach involves an explicitly configured attributeValues binding to use in f:validator and af:convertDateTime components in the af:inputDate in the filter facet, as discussed in the forum thread "af:table filter date format"
    at af:table filter date format
    I used JDeveloper 11.1.1.3.0 to create the example application
    in http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.03.zip
    - The page filterEmp.jspx shows expected behaviour, the filter uses the configured date format and there is no problem when navigating to another page and back.
    see the screencast at http://screencast.com/t/CtQ9rsVFH3k
    - The page menuBTFPage.jspx allows for some navigation after using the filter resulting in the filter showing a date in the wrong format, using scenario (sc1)
    -- (sc1-a) : run menuBTFPage.jspx
    -- (sc1-b) : on "menu-btf : menu", click the "do go-filter-emp-btf" link
    -- (sc1-c) : on "filter-emp-btf : filterEmpFragment", filter on HireDate using "10-03-2005"
    -- (sc1-d) : click the "do goReturnSuccess" button
    -- (sc1-e) : back on "menu-btf : menu", click the "do go-filter-emp-btf" link again
    -- (sc1-f) : back on "filter-emp-btf : filterEmpFragment", see the HireDate filter value in the wrong format as "2005-03-10"
    -- (sc1-g) : click the "do goReturnSuccess" button again, which results in an error "The date is not in the correct format."
    see the screencast at http://www.screencast.com/t/ORHauBd3oQ
    questions:
    - (q1) Can the behaviour in scenario (sc1) be reproduced?
    - (q2) Why is the filter value in the wrong date format in step (sc1-f)?
    - (q3) What can be done to have the filter value consistently in the configured date format, so that errors as in step (sc1-g) can be avoided?
    many thanks
    Jan Vervecken

    hi
    First a short summary of relevant aspects of service request 3-2190488381:
    - development has reviewed bug 10193260
    - development identified some code where a pattern was not applied and started fixing the problem
    - out of the blue, development asked "Will clearing out the filter field completely when moving out of ataskflow be an acceptable behavior ?"
    - I pointed out some concerns (even in a phone call with development), but development did not see any alternative not "perceived to be very risky because of the current design", so the question whether the clearing-all-filter-fields approach would be acceptable became superfluous.
    - following this, bug 10193260 suddenly became an enhancement request (for reasons I still don't understand)
    - a workaround was suggested (for behaviour not perceived as a bug), "Clearing the search fields during taskflow exit in the backing bean (in the app)." for which I also received a modified version of my example application TableFilterDateFormatIssueApp-v0.04.zip with an implementation of the suggested workaround
    As an exercise to try an understand the suggested workaround (an because my example application seemed to have been modified using the currently yet-to-be-released JDeveloper 11.1.1.4.0) I re-implemented it in the example application
    at http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.05.zip
    It has a filter-emp-workaround-btf task-flow with a method-call activity on a managed-bean method, responsible for clearing the search fields, resulting in behaviour where the error "The date is not in the correct format." does not occur,
    as can be seen in the screencast at http://screencast.com/t/Nq7TkkRQ
      public void clearFilterFields()
        BindingContainer vBindingContainer =
          BindingContext.getCurrent().getCurrentBindingsEntry();
        DCBindingContainer vDCBindingContainer = (DCBindingContainer)vBindingContainer;
        DCDataControl vDCDataControl = vDCBindingContainer.getDataControl();
        ApplicationModule vApplicationModule = vDCDataControl.getApplicationModule();
        ViewObject vViewObject = vApplicationModule.findViewObject("EmployeesVOVI");
        ViewCriteriaManager vViewCriteriaManager = vViewObject.getViewCriteriaManager();
        vViewCriteriaManager.clearViewCriterias();
        vViewObject.clearCache();
      }Because the managed-bean method requires access to the ADF Model binding layer to get to the View Object instance used for the filtered table, the method-call activity has a page element configured in DataBindings.cpx referring to the same usageId as the page element for the page fragment showing the filtered table. So that both the method-call and view activity depend on one and the same Binding Container (e.i. PageDef file).
    The method-call activity, responsible for clearing the search fields, would need to be called before each task-flow-return activity.
    As there can be multiple view activities with multiple filtered tables in a bounded task-flow, would that result in multiple method-call activities responsible for clearing search fields (all to be called before each task-flow-return activity)?
    It looks like a more general/generic approach is desirable for the suggested workaround to be feasible.
    - (q5) Does the suggested workaround imply (as bug 10193260 is not a bug) that all bounded task-flows with filtered tables should implement it to avoid errors about formatting?
    thanks
    Jan

  • Parent Table - Child Form(bounded task region)- Commit-Rollback Button's

    Hello,
    Here's my simple scenario:
    Jdev 11.1.1.2
    One Am(datacontrol).
    One vertical panel splitter
    On top A panel collection with a read-only table(employees VO), The table lists just a few of the attributes, so it's really just for browsing, and a toolbar with createinsert, commit and rollback button's.
    At bottom: A PanelTab with a bounded task flow - region. The child region(bounded task flow) contains an editable ADF form(same VO) will all attributes available for editing. The form(child region) also contains a 'submit' button (to post changes).
    When run the page commit and rollback button are disable. (ok)
    Navigation and sincronize between table and task flow works fine because i set partialtrigger. (ok)
    When i change some attribute in the form and then press summit button, I want the commit and rollback button's became active..
    . . any help would be much appreciated.
    Edited by: user7056373 on 08-ene-2010 3:23

    Hi Bart,
    if your bounded task flow is placed in .jspx using region it is possible to reach binding container of that task flow.
    You can use handies by Edwin Biemond:
    # // main jsf page  
    # DCBindingContainer dc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();  
    # // taskflow binding  
    # DCTaskFlowBinding tf = (DCTaskFlowBinding)dc.findExecutableBinding("dynamicRegion1"); 
    # // pagedef of a page fragment  
    # JUFormBinding form = (JUFormBinding) tf.findExecutableBinding("regions_employee_regionPageDef"); 
    # // handle to  binding container of the region. 
    # DCBindingContainer dcRegion   = form;  but ExecuteWithParam works for me in bounded task flow - I think you have mistake in your NDValue="#{pageFlowScope.pclNummer}". you should use $ instead #
    regards,
    Branislav

  • Master table, detail table, detail table not getting refreshed selection

    i have a page where i am displaying data as master table and detail table. both table VOs are based on SQL queries which use bind variables.
    i have a view link between vos of type 1:M
    i created master table detail table page by dropping detail iterator from data control panel under master and selecting master table detail table
    on my page i see detail table records getting populated only for first record of parent table.
    on changing parent record, child table shows same records and does not refresh
    i am using partial triggers on both tables to be populated on a button click as i need to pass some bind variables to VOs which are taken as input from users
    how can i show corresponding rows in detail table when parent record in table changes
    will i have to use table selection listener
    is it possible declaratively to have master detail table view when both VOs have bind variables
    jdev 11 1 1 5

    these are the SQLs used
    Parent SQL Based VO Query
    SELECT to_char(d.status_date,'yyyymmddhh24') TIME123, count(DISTINCT d.c4)
    FROM t1 d,
    t2 w
    WHERE w.c1 = nvl(:ou, w.c1)
    AND UPPER(w.c2) = UPPER(nvl(:tt, w.c2))
    AND d.c3 >= :startTime AND :startTime IS NOT NULL
    AND d.c3 <= :endTime AND :endTime IS NOT NULL
    AND d.c4 = w.c4
    AND UPPER(d.status) = 'CLOSED'
    GROUP BY to_char(status_date,'yyyymmddhh24') ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    Child SQL Based VO Query
    SELECT w.c1,
    w.c5 - w.c6 processing_time,
    w.c3,
    w.c6,
    w.c7,
    w.c8,
    to_char(d.status_date,'yyyymmddhh24') TIME123 FROM t1 d,
    t2 w
    WHERE w.c2 = nvl(:ou, w.c2)
    AND UPPER(w.c3) = UPPER(nvl(:tt, w.c3))
    AND d.c4 >= :startTime AND :startTime IS NOT NULL
    AND d.c4 <= :endTime AND :endTime IS NOT NULL
    AND d.c1 = w.c1
    AND UPPER(d.status) = 'CLOSED' ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    view link is based on column TIME123

  • Master table detail table with SQL based read only VO with bind variables

    i have a page where i am displaying data as master table and detail table. both table VOs are based on SQL queries which use bind variables.
    i have a view link between vos of type 1:M
    i created master table detail table page by dropping detail iterator from data control panel under master and selecting master table detail table
    on my page i see detail table records getting populated only for first record of parent table.
    on changing parent record, child table shows same records and does not refresh
    i am using partial triggers on both tables to be populated on a button click as i need to pass some bind variables to VOs which are taken as input from users
    how can i show corresponding rows in detail table when parent record in table changes
    is it possible declaratively to have master detail table view when both VOs have bind variables
    jdev 11 1 1 5
    these are the SQLs used
    Parent SQL Based VO Query
    SELECT to_char(d.status_date,'yyyymmddhh24') TIME123, count(DISTINCT d.c4)
    FROM t1 d,
    t2 w
    WHERE w.c1 = nvl(:ou, w.c1)
    AND UPPER(w.c2) = UPPER(nvl(:tt, w.c2))
    AND d.c3 >= :startTime AND :startTime IS NOT NULL
    AND d.c3 <= :endTime AND :endTime IS NOT NULL
    AND d.c4 = w.c4
    AND UPPER(d.status) = 'CLOSED'
    GROUP BY to_char(status_date,'yyyymmddhh24') ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    Child SQL Based VO Query
    SELECT w.c1,
    w.c5 - w.c6 processing_time,
    w.c3,
    w.c6,
    w.c7,
    w.c8,
    to_char(d.status_date,'yyyymmddhh24') TIME123 FROM t1 d,
    t2 w
    WHERE w.c2 = nvl(:ou, w.c2)
    AND UPPER(w.c3) = UPPER(nvl(:tt, w.c3))
    AND d.c4 >= :startTime AND :startTime IS NOT NULL
    AND d.c4 <= :endTime AND :endTime IS NOT NULL
    AND d.c1 = w.c1
    AND UPPER(d.status) = 'CLOSED' ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    view link is based on column TIME123

    Instead of doing the master-detail layout by dragging the details over, can you try a new page where you first drag the master VO over and then drag the detail VO over, and then set partialTrigger from the detail to point to the master?

  • Button enable/disable in Master-Detail table

    I am using JDeveloper 11.1.1.3.0 and I have a page fragment (.jsff) which includes a Master-Detail table and the Master table has 3 buttons that get enabled/disabled based on the specific string within a column say, if the column has value, 'DRAFT', the buttons should be enabled. In all other cases, the buttons should be disabled.
    The above mentioned scenario works in cases where the table has more than one row in the table; but in two cases the buttons don't get enabled even though the column has 'DRAFT' as its value:
         1. when the table first loads with the data populated in the table; clicking on the first row doesn't trigger the buttons, clicking on any other row triggers the buttons
         2. when there is only one row in the table
    To resolve this, I tried looking at the logs for any specific information regarding the buttons getting enabled or disabled. I couldn't find info on setting up a breakpoint for the commandbutton and the disabled property which would enable me to determine whether it is being triggered as soon as the table gets populated or not.
    How can I get the buttons to work per my requirements? Also, can I set breakpoints for the button and/or evaluate disabled property's EL expression?
    Thanks in advance.

    Navaneeth:
    The buttons are part of panelCollection which exists in panelHeader. As the below code demonstrates,
    1. Buttons are defined in the toolbar (t2) in panelCollection (pc1)
    2. Each buttons' partialTrigger is set to the table (md1)
    3. Tables' (md1) partialTrigger is set to the toolbar (t2).
    <af:panelHeader text="#{viewcontrollerBundle.HISTORIC_PANEL_SPECS__TESTER_S}" id="ph2">
            <af:panelCollection id="pc1" styleClass="AFStretchWidth">
              <f:facet name="menus"/>
              <f:facet name="toolbar">
                <af:toolbar id="t2" partialTriggers="t2">
                  <af:commandButton actionListener="#{bindings.promotePanelSpec.execute}"
                                    text="#{viewcontrollerBundle.PROMOTE_PANEL_SPEC}"
                                    id="cb1" icon="/Images/up16.png"
                                    partialTriggers="md1"
                                    disabled='#{bindings.Status!="DRAFT"}'
                                    immediate="true"/>
                  <af:commandButton text="#{viewcontrollerBundle.ADD_TESTER_SPEC}" id="cb2"
                                    partialTriggers="md1"
                                    icon="/Images/action_add.gif"
                                    actionListener="#{bindings.CreateWithParams.execute}"
                                    action="addTestSpec"
                                    disabled='#{bindings.Status!="DRAFT"}'/>
                  <af:commandButton actionListener="#{PanelSpecTesterSpec.deleteTesterSpec}"
                                    text="#{viewcontrollerBundle.REMOVE_TESTER_SPEC}"
                                    id="cb3" partialTriggers="md1 ::pc2:t1"
                                    icon="/Images/delete.png"
                                    disabled='#{bindings.Status!="DRAFT"}'/>
                </af:toolbar>
              </f:facet>
              <f:facet name="statusbar"/>
              <af:table id="md1"
                        rows="#{bindings.PanelSpecTesterSpecView1.rangeSize}"
                        fetchSize="#{bindings.PanelSpecTesterSpecView1.rangeSize}"
                        emptyText="#{bindings.PanelSpecTesterSpecView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        var="row"
                        value="#{bindings.PanelSpecTesterSpecView1.collectionModel}"
                        rowBandingInterval="0"
                        selectedRowKeys="#{bindings.PanelSpecTesterSpecView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.PanelSpecTesterSpecView1.collectionModel.makeCurrent}"
                        rowSelection="single" partialTriggers="::t2"
                        filterVisible="true" displayRow="selected"
                        filterModel="#{bindings.ProductIdPanelSpecVersionToolNameQuery.queryDescriptor}"
                        queryListener="#{bindings.ProductIdPanelSpecVersionToolNameQuery.processQuery}">
                <af:column headerText="#{bindings.PanelSpecTesterSpecView1.hints.ProductId.label}"
                           sortProperty="ProductId" sortable="true" id="c39"
                           filterable="true">
                  <af:outputText value="#{row.ProductId}" id="ot28"/>
                </af:column>
                <af:column headerText="#{bindings.PanelSpecTesterSpecView1.hints.Status.label}"
                           sortProperty="Status" sortable="true" id="c43"
                           filterable="true">
                  <af:outputText value="#{row.Status}" id="ot40"/>
                </af:column>
              </af:table>
         </af:panelCollection>
    </af:panelHeader>The fact that the above code works when there are multiple rows tells me that buttons are having trouble reading the first row of the table.
    Also, I changed the displayRow property for the table from "selected" to "first" but no luck either.

  • Several reports on joined master-detail tables with single row source

    I have 1 master table (Fixed Assets) and several datail tables (Improvements, Depreciation, ...)
    I need to create several reports based on them all with criteria
    'Select ALL from Master and join details
    /1 total row from details for 1 master row/
    filtered by [on_date <= report_date]'
    How to do it better and not copy same code in every report?
    As mentioned on this forum, ApEx is not able to use RefCursor as row source for ApEx reports
    So I tried this Tom Kyte's example:
    create type apex_user.myRecordType as object
    (seq int,
    a int,
    b varchar2(10),
    c date
    Create Or Replace Type Apex_User.Mytabletype As Table Of Apex_User.Myrecordtype;
    create or replace function Apex_User.my_function return Apex_User.myTableType
    Is
    l_data Apex_User.myTableType;
    Begin
    l_data := Apex_User.myTableType();
    for i in 1..5
    loop
    L_Data.Extend;
    l_data(i) :=Apex_User.myRecordType(i, i, 'row ' || i, sysdate+i);
    end loop;
    Return L_Data;
    End;
    Select *
    from TABLE (cast(Apex_User.my_function() as Apex_User.mytableType))
    Where C > Sysdate+1
    Order By Seq Desc
    SEQ A B C
    5 5 row 5 22.08.2010
    4 4 row 4 21.08.2010
    3 3 row 3 20.08.2010
    2 2 row 2 19.08.2010
    4 Rows Selected
    - and it really works from ApEx reports.
    The questions are:
    1) is this the best solution for my task (one centralized code for several reports with parameter filtering detail tables)?
    2) how to change example properly to have here -
    loop
    L_Data.Extend;
    l_data(i) :=Apex_User.myRecordType(i, i, 'row ' || i, sysdate+i);
    end loop;
    - simple SELECT from my MASTER-DETAILS joined tables?

    Hi,
    if (row != null)
    Row masterRow = row;
    vo.setCurrentRow(masterRow);
    // not needed : getMesReponsesPourTiersVO1().executeQuery();
    You shouldnot execute the child VO after setting current row in master VO.
    When the current row is set in master VO, then the child rows will get refreshed automatically.
    Cheers,
    Prasanna

  • Sql loader master detail tables

    Hi
    I am trying to load master detail tables using sql loader. I have a sequence in the master table as primary key and have to load primary key in detail table. is there any way i can query up the primary key by name in the control file. please whats the best way to do this.
    can i query up the primary key in the master table by the name in detail table which is jan09.
    e.g
    master data
    jan09,description
    detail data
    jan09,'test1','100,'y'
    LOAD DATA
    INFILE 'test.data'
    insert
    INTO TABLE master_table
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id position(1:2) "myseq.nextval",
    code char,
    creation_date date sysdate,
    last_update_date date sysdate,
    into TABLE BDETAILS
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id number "select id from master_table where code=" || :code
    name char,
    amt decimal,
    flag char
    )

    Hey Here is what you need.
    You will have to understand and test this properly.
    It took me quiet some time before i could get to this stage
    Here is the test data with all the commands.
    As far the ID in the detail table is concerned you have no option but to update that column once the loading is complete.
    1) create Table
    CREATE TABLE master_table(ID NUMBER,code VARCHAR2(50),creation DATE,last_update DATE);
    CREATE TABLE bdetails(ID NUMBER,NAME VARCHAR2(100),amt NUMBER,flag VARCHAR2(10));
    ALTER TABLE master_table ADD (chc VARCHAR2(10));2) Create Sequence
    CREATE SEQUENCE testseq INCREMENT BY 1;3) CTL FILE
    LOAD DATA
    INFILE 'c:\sqlldr\test.txt'  /*path of data file */
    append
    INTO TABLE master_table
    when (1) ='M'  /*to check if the record in the data file is a master record */
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id  expression "testseq.nextval", /*select next value from sequence */
    mcol1 filler, /*FILLER keyword is sused to skip first column from data file */
    chc,
    code  ,
    creation "sysdate",
    last_update "sysdate"
    Into TABLE BDETAILS
    when (1) ='D'  /*to check if the record in the data file is a Detail record */
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id  expression "testseq.currval", /* UNFORTUNATELY THIS PICKS UP THE LAST ID OF THE MASTER RECORD SESSION STUFF GOING ON HERE*/
    col1 filler position(1:2),  /* specifying this POSITION(1:2) is very very important as you need to reset the cursor to start of the line for the next record */
    name  ,
    amt ,
    flag )4) SQLLDR Command
    sqlldr scott/tiger data=c:\sqlldr\test.txt control=c:\sqlldr\1.ctl
    5) data file
    M,jan09,description
    D,test1,100,y
    M,feb09,description1
    D,test2,200,x
    M,mar09,description2
    D,test3,200,xHope this helps you and give you a lead how to proceed.
    Cheers!!!
    Bhushan

  • More than one Detail table in the Master Detail forms!

    Hi,
    I need to have more than one Detail table in Master Detail Forms.
    I want to see the details of the rows of the first Detail table in the Second Detail table. Please guide me to do this.
    Sincerely yours,
    Mozhdeh

    You can do one of two things
    1) Depends on the nature of your data model. I was able to manage many to many
    relationships using views and instead of triggers. This solution is somewhat complex but can work in certain situations.
    2)Works for situations where master record exists. create a page with mulitple portlets syncronized on some related key.
    create the following package to use on the md forms to place on the one page to be rendered.
    -- this package will facilitate the storage and retrieval of keys used by the related forms.
    create or replace package session_var
    IS
    session_parms portal30.wwsto_api_session;
    g_domain varchar2(2000) := portal30.wwctx_api.get_user;
    function get_id (id in varchar2) return number;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    END SESSION_VAR;
    create or replace package body session_var
    IS
    --pkg body
    function get_id(id in varchar2) return number is
    l_store_session portal30.wwsto_api_session;
    l_id number;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_id := l_store_session.get_attribute_as_varchar2( p_name => id);
    return l_id;
    end get_id;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    IS
    l_store_session portal30.wwsto_api_session;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_store_session.set_attribute(
    p_name => id,
    p_value => p_val );
    l_store_session.save_session;
    * Redirect to the page using p_url;
    portal30.wwv_redirect.url(P_URL);
    end set_id;
    END SESSION_VAR;
    --the form master detail form, section  before display page enter the following code and publish as portlet.
    declare
    l_fs varchar2(4000);
    l_s varchar2(4000);
    v_con_id number;
    begin
    v_con_id :=rfq.session_var.get_id('CON_ID'); -- primary key and key used to relate details
    p_session.set_shadow_value( p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_CON_ID', -- attribute on form related to primary key
    p_value => '= '|| v_con_id,
    p_language => portal30.wwctx_api.get_nls_language ,
                   p_index => 1
    l_fs := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_FORM_STATE');
    l_s := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_STATUS');
    if l_fs = 'SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    if l_fs = 'QUERY_AND_SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    exception
    when others then
    PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','onLink', p1 => sqlerrm);
    raise;
    end;
    --then create other md forms and publish as portlets in a similar manner.
    -- create a form (form_session_vars) to call procedure session_vars and place the following code in the
    addiontional pl/sql tab
    WWV_GENSYS_1(
    p_block_name => p_block_name ,
    p_object_name => p_object_name,
    p_instance => p_instance ,
    p_event_type => p_event_type ,
    p_user_args => p_user_args ,
    p_session => p_session);
    --then create a page and place the md forms created above as portlets on the page.
    --create a link and target the form_session_vars and in the link target inputs
    enter the values for your user parameters
    id= CON_ID --"your primary key name"
    p_url= url/page/"your_page"
    --finally create a report (QBE or standard).
    in the column formation section use the link created earlier to direct the user to the target page.
    How it works.
    When the link is selected the form_session_Var is called and automatically runs setting the primary key values
    in the user session store. The step is required or the resulting page will not render properly. Then the user is redirected to the page where the portlets are rendered. The portlets start rendering, the before display page calls the session vars package to retrieve the key and put the form into query_update mode returning the data.
    The portlets finish in query_and_save mode with details in update mode, the allowable insert, delete and none actions will be available for the details.
    benefits: The session_Var package code is resuable as well as the form form_session_Var and the link. passing the key name and values are done at the report level and detailed in the report links. the md forms will need to reference their related keys.

Maybe you are looking for

  • HP laserjet 1300 with windows 7 (64 bits)

    Please help me to find why my printer Hp LaserJet 1300 cannot print more than 1 copy with Windows 7 (64 bits).  Is a new driver to solve this problem. Thank You HiRichard

  • Why is my app store app gone from my ipod touch 2nd gen

    The app store is now missing from my Ipod touch 2nd gen, I don't know how to get it back, also i was wondering if it is possible to get older versions of some apps , example would be the apple remote app, on my 2nd gen ipod touch, since i cannot upda

  • Help with the query

    Hi I need to execute a select statement base on an input parameter like the following. Please share your thoughts select (case when param = 1 then (select * from emp_1 a,dept_1 b where a.dept_no=b.dept_no) when param = 2 then (select * from emp_2 a,d

  • Connection Timeout during Synchronous proxyc- 500 Connection timed out

    Hi , We are seeing the HTPP timeout issue in synchronous proxy. It says timeout aftr 250 secs Error: -5 Version: 7200 Component: ICM Date/Time: Thu Jul 28 15:38:10 2011  Module: icxxthr.c Line: 4295 Server:  Error Tag: {-} Detail: Connection to partn

  • Notebook hp G42 put on hybernatio​n when playing games

    notebook hp G42 with windows 7 ultimate always hibernate when playing games why and how to solve