Procedure Based Form with master details Relationships

Helo All
Here i m having some problem in making one form which is having 2 tables one is master and other is detail table and i already made relationship between them but still i make both forms at that moment form didn't make the auto relationship.even after taht when at the form level i made the relationship between 2 tables it made but at teh compilation time it gives error.
Actually one table was there at that time it worked but with relation it creates problem.
Can anybody give me any idea how to sort out this problem.

Helo Frankin
Actualy the error came when i made the master detail relation manualy.but as per me if both tables have relationship with each other then no need to create it manualy isn't it?
even after that i created teh relation manaualy but at the on clear block details trigger it showed compile time error.
If possible can u give me any live example for this
TQ
Vivek

Similar Messages

  • Problem with master/detail relationship

    Two tables :
    Master_table:
    Customer_no primary key
    Buyer_seller_type primary key
    Product_code primary key
    Detail_table
    Branch primary key
    Customer_no primary key
    I altered detail_table and added 2 more primary key fields:
    Buyer_seller_type primary key--
    Product_code primary key.
    Now I have to change the existing fmb according.
    I have maintained master/detail relationship for these 2 tables in the form.
    When I run this form and Try to save the date . I am getting error like
    Cannot insert null into buyer_seller_type field ie my new column.
    Insert into detail_table (branch,customer_type) values (:1,:2) ;
    I have maintained master/detail relationship. And what r the others properties I have to set to overcome this .
    my requirement is query should be like this:
    insert into detail_table (branch,customer_type,buyer_seller_type,product_code) values (:1,:2,:3,:4) ;
    how can i do this.
    I am using forms 6.
    plz its very urgent..plz help me.
    advance thanks

    Set following item property under Data node for both the new added column in detail table:
    Copy Value from Item:
    Enter <master_table_name.item_name>
    Regards,
    Hassan

  • Master Details relationship

    I have an application where I need to have master detail relationship. I have seen a demo ( dept-emp ) but my requirements are slightly different from this demo.
    Just to simplify it, I have these fields in the SD_SOWS which acts as MASTER table and it has SOW ID as primary key.
    And I have 2 detail tables. One is used to hold all the handsets (SD_SOW_HANDSETS ) and the other one is to hold all the platforms ( SD_SOW_PLATFORMS ) . And they both are tied up using SOW_ID column ( this is the fk ).
    The problem arises when I added a new SOW and I have assigned SOW ID with the new value automatically by changing SOURCE to SQL Query and run this statement below :
    SELECT NVL( NEXTVALUE ,1)
    FROM (SELECT MAX(SOW_ID) + 1 NEXTVALUE
    FROM SD_SOWS
    But
    1) when I added the one of detail tables ( SD_SOW_HANDSETS ) , this new SOW ID doesn't get carried forward to SOW ID column of this detail table (it becomes blank )
    2) If I entered this column manually ( assuming I use the same number as the one in MASTER table -SD_SOWS ) and I have it saved , it throws exception
    ORA-02291: integrity constraint (DSSMASTER.FK_SOW_HANDSET_SOWID) violated - parent key not found
    I know the reason is that I haven't confirmed and saved the master table yet but I was wondering if HTMLDB can create a dummy SOW ID in the MASTER table and save it temporarily in db where it allows the children / details to reference the same number.
    any ideas ?
    Dony

    I'm always getting the same details for all masters rows. any idea what could it be ? Sounds like you didn't set the Block.Query Data Source Arguments property so that your Master block key values are not getting passed to your "Query" procedure. You will need to create a parameter to your procedure for the key value as well. Did you use my Demo or My Oracle Supports? If you used my demo, you will need to modify the EMP_SELECT procedure to accept the DEPT_NO as a parameter and then adjust your query to use the parameter.
    If you used My Oracle Supports demo (doc ID 66887.1) then look at Example B. Multi-Block operations with Master-Detail relationship. It shows you how to write the query procedure to accept additional parameters.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Master-detail relationship - passing parameter from form to form

    Hello.
    I have a question about master detail relationship.
    In first form we have master-detail relationship.
    Example on dept, emp tables:
    We query dept (master), so we can get one or many emp (detail) records. Then we have a third table - tasks. Tasks table (detail) can have many records for one employee.
    Tasks table is in another form, which is called with call_form built_in. So we pass a parameter from master to detail - parameter empno. Because of that, we can only see tasks for one employee and can't navigate to another employee. This is normal.
    Now comes the question.
    Is it possible to call a form (with tasks table) with deptno parameter (so we can navigate through all employees with that department), but first show employee that was last used in first form?
    Example of our goal.
    Master: deptno = 20
    Detail: navigate to JONES employee
    Call new form (tasks)
    Tasks for JONES employee are first shown
    Can navigate to another employee - without requery
    Is this possible?
    If we pass deptno parameter, we can navigate through all employees - but must navigate to the employee we last used in first form.
    If we pass empno parameter to second form, we see last used employee but cannot navigate to another employee without requery.
    Hope you understand my problem.
    Thanks.

    Hi
    yes you can pass parameter from one form to another.
    In your master detail form set the trigger when-new-instance and there define the global variable like
    :GLOBAL.G_CIRCLE_ID := NULL;
    and in your task table set the trigger when-new-instance and there define the global variable like and also write this code
    :GLOBAL.G_DIVISION_ID := NULL;
    IF :GLOBAL.G_CIRCLE_ID IS NOT NULL THEN
         GO_BLOCK('DIVISION');
         SET_BLOCK_PROPERTY('DIVISION',DEFAULT_WHERE,'CIRCLE_ID ='||''''||:GLOBAL.G_CIRCLE_ID||'''');
         EXECUTE_QUERY;
    END IF;
    :GLOBAL.G_CIRCLE_ID := NULL;
    now you maintain your trigger according your need.
    Regards,

  • Master Detail Relationship and Posting changes!

    I have a "MAster" medical-procedure block, and an "Detail" items block. The items block, being the detail block, in the master detail relationship shows the items used during the medical procedure. Both the master and detaqil blocks are based on stored procedures.
    Problem: I have multiple medical procedures (multi record master) and many items associated with the procedure (multi record detail). If I ask the user to "SAVE" the changes, after every detail entry ( for the correspondin master), it becomes a "PAIN" for the user. He wants to be able to choose a procedure, choose the details(items) associated with that procedure, and move on to the next master record, (the next medical procedure) , select it, if he performed that procedure, choose its corresponding detail items, "WITHOUT SAVING IN BETWEEN" navigation between the master records / "MEDICAL PROCEDURES"!
    1. Is it better to go for a master-detail relationship? If so, how do I prevent the "Please save the changes" when navigating between master records and ALSO save the details, without doing the "SAVE" multiple times. Can I go for a post ?..If so where? When-new_record instance/ any "Form level trigger"?
    2. If I do the go_block('dtl blk name'); execute_query; thing to coordinate between blocks, and "post" changes in the when -new -record-instance of master, the detail complains of a null value when I move from a medical procedure to another medical procedure which is not actually performed.
    I hope I make sense, any suggestions , "Welcome"!
    Thanks!

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Visualize master-detail relationships using SQL Edge 1.2

    SQL Edge 1.2 released by Bay Breeze Software (http://www.baybreezesoft.com) is an Eclipse Rich Client application that allows users to execute SQL queries, browse schema information, and visualize master-detail relationships.
    With SQL Edge, users can use only one query to retrieve data in a master table, and then browse data in all related detail tables. Users can also insert, edit, and delete table records in the data grids.
    SQL Edge has four perspectives. The Query Perspective allows users run any SQL queries, while the Schema Perspective displays table schema information. There are two relationship perspectives. The Relationship Table View displays data in the master-detail style. The Relationship Tree View displays master table records as top-level tree nodes. The nodes can be expanded to reveal any level of related detail records. In addition, clicking any node will display the corresponding data in a detail grid.
    The following summarizes SQL Edge's major features:
    (1) Support any JDBC compatible databases.
    (2) Allow users to specify JDBC drivers at run-time, and provide wizards to help setup JDBC connections. Easy to install, and easy to setup.
    (3) SQL editor with syntax highlighting based on currently connected databases.
    (4) SQL edtior allows users to execute SQL queries asynchronously. Users can cancel the execution by click the "Cancel" button or just close the SQL Editor.
    (5) Schema perspective displays the table schema information, including column definitions, primary key, indexes, and foreign keys.
    (6) Relationship table view displays the related data in master-detail style, with master table data shown in the top grid, and all related detail table data in a list of bottom grids.
    (7) Relationship tree view displays the master table records as top-level tree nodes, and the related detail records as child nodes. Click any of these tree nodes will display the corresponding record data in a detail grid.
    (8) Allow users to insert, edit, and delete records in the master and detail grids of the relationship table view and relationship tree view.
    (9) Allow users to define master-detail relationships even between tables in different databases. This enables the relationship table view and relationship tree view to display data relationships between tables in different databases or without pre-defined foreign keys.

    Hi, Martin.
    Maybe you don't need a master detail relationship. Do you need to do changes in your detail block, or just queries?
    If just queries, you can create your second block based on a From-Clause Query, and change the QueryDataSourceName property with a When-List-Changed trigger in your T-List.
    I know this is a little vague but, without knowing what you need to do in the second block, I'm afraid to tell you more.
    Feel free to mail me directly, if you need some pointers about Forms.
    Pedro

  • Facing java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController while am using master detail relationship by af:table

    Hi friends,
         We are in to new development in Oracle ADF and newbie to this technology.
         Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and  entity based view).
        Below exception raised when navigating from one  to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
    java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
    at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
    at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi timo,
    Thanks for ur reply...
    we are using unbounded taskflow.
    In Controller class(page def file), we refered the class that implements PagePhaseListener
    The following override methods has created
      public void afterPhase(PagePhaseEvent pagePhaseEvent) {
    //In this area we used to read the session object file which is written and sent by another application(application to application navigate).
    If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
      public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    Is we used Controller class wrongly ???
    Is there any relationship with region controller???
    Mani
    [email protected]

  • Is it possible to display records without master detail relationship?

    Hi all,
    I've a form for importing excl to oracle with column mapping. i.e I've display excl column heading on the form.
    In front of each excel column heading I've provide a list item which contains table column heading so user can map his excl column with table column and according to data gets insert into the database table.
    There are 28 excel and table column headings on the form every time user will have to map the column. Its very time consuming job. That's why I've decide to provide template to user. e.g user maps the excl column with table column only first time, then this combination is saved as 'template 1' . when user runs the form next time he/she needs to just select template-1 from lov. and that template get displayed on the forms field. Then user will press the process button and data gets inserted into respective table
    Now I've created two tables
    1. mst_template
    template_name        varchar2(100) ---primary key.
    2. template
    template_name   varchar2(100) --- foreign key (ref. tempalte_name - mst_template)
    ex_col                varchar2(100)
    tb_col                varchar2(100)Now my problem is, I try the master detail relationship but it doen't works becase on my form the condition is
    excel col                                   table col
    excl_col1                                 Tab_col1
    excl_col2                                  tab_col2
    excl_col28                                Tab_col28       i've establish the master detail relationship but getting error
    FRM-40505:ORACLE error:unable to perform query. as i use excl_col1, tab_col1.. etc
    can i achieve it by using cursor? without using master detail relationship. My 90% coding is done. only thing remaining is to display records on form. so can i use cursor in this situation? and how? I've work so hard on it and lot of time is spend too so i don't want to change the coding of the existing form. any suggestion for this problem.
    please help
    Regards
    sam.

    Turning on Closed Captioning is all you can do.  I think the problem you have is that not all movies have closed captioning.

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Duplicate rows in Detail Table - Master Detail Relationship

    Hi,
    I have developed the Page it has following components. (Jdeveloper 10g - R12)
    1) Query RN
    It has around 11 parameters, 5 parameters have LOV attached, 2 are mandatory parameters.
    Auto Customization criteria. we don't criteria map defined , where clause is build based on parameters and vo.executeQuery gets called on Go button click.
    2) Sales Order Table RN (Master)
    3) Sales Order Line Table RN (Detail)
    View link is created to maintain the master detail relationship and detail region is attached to AM using view link under master region.
    Page flow works in this way, when user enter the parameters in search region and click on Go button, Sales Order table RN (master) gets populated.
    It has radio button when user click it fires PPR event .
    Process form request gets called and master row gets set (Same code as per developer guide) and Sales Order Line table RN (detail).
    Problem is once detail region gets populate and when user change any parameter which has LOV attached somehow same rows gets added to detail region which is weird because we have not clicked on GO button and radio button on header region is also not touched but detail region is populated somehow.
    Please help
    Thanks.
    Deepak

    Provide the query used for populating the child records. Issue might be due to caching.
    Thanks
    Shree

  • Displaying a Master Detail Relationship in a Panel Accordion or Tabs

    Hi,
    Is it possible to display a Master-Detail relationship in a Panel Accordion or Panel Tab or other component that visually divides the display?
    Say I have a Department - > Employees master detail relationship and I want each tab in my accordion to represent each
    departments and when I clicked the tab, the list of employees associated with that department is displayed.
    I am exploring this idea but I cant get to find a resource on how to move forward. I am using JDev 11.1.1.4. Thanks

    Hello,
    I recently faced the same problem and did not find a clean solution either. So I implemented it a bit more "dirty". :-)
    Instead of using the Department > Employee view link, I just created a new view object (say EmployeesFromDept), that has a bind parameter called p_DeptId:
         SELECT ...
         FROM   EMPLOYEES e
         WHERE  e.DEPARTMENT_ID = :p_DeptIdThe Data Control of this VO will have an ExecuteWithParams operation that takes the department id as input. Create an action binding in your page definition that binds to this operation, called "RefreshEmployeesForDept":
         <action IterBinding="EmployeesFromDeptIterator" id="RefreshEmployeesForDept"
                InstanceName="MyAMDataControl.EmployeesFromDept"
                DataControl="MyAMDataControl" RequiresUpdateModel="true"
                Action="executeWithParams">
          <NamedData NDName="p_DeptId" NDValue="" NDType="java.lang.String"/>
        </action>In your page, add the current DepartmentId to each showDetailItem using an attribute and add a disclosureListener:
         <af:iterator id="i1" value="#{bindings.Departments.collectionModel}" var="row">
                <af:showDetailItem text="#{row.DepartmentName}" disclosureListener="#{pageFlowScope.myBean.toggleDisclosed}">
                   <f:attribute name="currentDepartmentId" value="#{row.DepartmentId}"/>
                              <af:table value="#{bindings.EmployeesFromDept.collectionModel}" var="row"
                          rows="#{bindings.EmployeesFromDept.rangeSize}"
                          emptyText="#{bindings.EmployeesFromDept.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.EmployeesFromDept.rangeSize}"
                          rowBandingInterval="0" id="t1">
                   //Lots of mapping column here
                        </af:table>
                </af:showDetailItem>
         </af:iterator>Now each showDetailItem that is generated knows the DepartmentId it "belongs to". In the toggleDisclosed(DisclosureEvent disclosureEvent) method, first fetch this attribute, so that you know the dept id of the showDetailItem that was clicked. Next, programmatically call the RefreshEmployeesForDept action binding if the current event is "disclosing the showDetailItem":
         public void toggleDisclosed(DisclosureEvent disclosureEvent) {
              String currentDepartmentId = disclosureEvent.getComponent().getAttributes().get("currentDepartmentId").toString();
              if(disclosureEvent.isExpanded()){
                   DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   OperationBinding operBinding = bindings.getOperationBinding("RefreshEmployeesForDept");
                   if(operBinding != null){
                        operBinding.getParamsMap().put("p_DeptId", currentDepartmentId);
                        operBinding.execute();
        }Now, each time a showDetailItem is opened, the bind variable of the iterator belonging to your list of Employees will be refreshed with the correct DepartmentId. Ie the department that the showDetailItem represents.
    Hope this helps! If you find a cleaner solution, please let me know. :-)
    Regards,
    Chris

  • Problem using rollback in master-detail relationship

    Hello,
    I have an odd error using master-detail relationship, for example: countries and states. This is the problem:
    I have 3 pages:
    Page A: Read-only table of countries
    Page B: Read-only table of states
    Page C: State form
    and the flow:
    1. In the page A, select a country and click button to go to the states page
    2. In the page B, select a state and click detail button to go to the state form page
    3. In the page C, edit something and click rollback button. The rollback button's action goes to the page B
    4. In the page B, the states table is empty but I expected the table contains the same states those were in the step 2
    I know it's a bit difficult to understand but I hope someone can help me.
    Thanks, edwin.
    Edited by: user13259215 on Jun 19, 2012 10:44 PM

    On invoking Rollback the whole of AM is refreshed and hence all VOs are refreshed. The first row in all VOs is selected by default. You will need to retain the VO row selections on your own. Check this thread for ideas.
    Stay on previous or next row on rollback.

  • ESB problem when use merge function in master/detail relationship

    I have some problem with the merge function in database adapter.
    details:
    I have 2 tables in master/detail relationship, both have GUID column as a primary key (GUID generated by ESB).
    'car_group' table
    pk : guid
    unique : group_no, datadate, datatime
    ===============================
    guid, group_no, datadate, datatime, group_detail
    ===============================
    1, 1, 01/01/2008, 09:00, groupdetail01
    2, 1, 01/01/2008, 10:00, groupdetail02
    'car_group_detail' table
    pk : guid
    fk : car_group_guid link to car_group.guid
    ==================
    guid, car_group_guid, detail
    ==================
    1, 1, detail01
    2, 1, detail02
    3, 2, detail03
    4, 2, detail04
    I used a file adapter as a input, here is an example text file
    M, 1, 01/01/2008, 09:00, groupdetail01
    D, detail01
    D, detail02
    M, 1, 01/01/2008, 10:00, groupdetail02
    D, detail03
    D, detail04
    Because I used merge function so I need to specify the columns that will be a condition for the insert/update,
    but I have generate GUID as a primary key in the tables, I can't used it, so in toplink I map my unique key as a primary key.
    The insert operation work fine but when update is required (for example, try to change 'group_detail' column of the master table in text file),
    an SQLException thrown, the log file shown the adapter try to update the GUID column of master table but the constraint not allowed.
    And yes, cause of GUID generate everytime so ESB try to update this column also, but I don't want to do like that, I need something
    like when update operation required, just ignored the GUID column.
    I try to mark read-only to the GUID column in Toplink mapping file but still have the same problem, it still generate UPDATE statement
    with the GUID column, and also I try to let the database trigger to generate GUID instead of ESB function, but it not works in master/detail
    relationship (I think the Toplink manage the relationship, is it right ?)
    Please advise, thanks for advance.

    somebody please help, thanks !!!

  • Error Handling on procedure based forms

    Hi all,
    I have seen examples of error handling on table based forms like
    the following:
    begin
    doInsert;
    exception
    when others then
    --redirect to some error page
    I have tried the same with a procedure based form by wrapping
    the doSubmit procedure, but when the procedure returns an
    exception, it doesn't execute my exception handling code.
    Any ideas on why this is happening or at least how I can catch
    these exceptions with my own exception handler?
    Thanks,
    Curt

    Chetan, Antonio,
    I opened a TAR on this issue with Oravle and they got the same
    results. Thay suggested a work around of creating an error table
    that gets written to and then dispaly and new page to retrieve
    the error from the table.
    What I ended up doing is creating a dummy procedure that does
    nothing (NULL). The form based on the dummy procedure allows me
    to get the values I need from the user.
    The procedure always returns succesful since it doesn't do
    anything. So in the form success code area I call the real
    procedure, check the return value, and now I can redirect back
    to the orignal form on error, or direct to another paqe on
    success.
    Not the most elegant solution, but it is working for now.
    Curt

Maybe you are looking for

  • Word is crashing when I try to open...

    I've tried restarting the computer, as well as accessing Word from an established document. (This worked until I tried to open a new document or make changes.) Any ideas?

  • XML data into an Array

    Hey, I have successfully loaded an external XML data file into my movie. Now I would like to save the node values into an array so i can manipulate and call as required...Is this possible or is there a better way to go about this?

  • Macro to create file in folder no longer works.  Help in fixing, please.

    I switched from PC to Mac. I have Xcel files with Macros. The macros create a file and save it to c:\my documents\wherever the macro tells it. That is in Xp. Now I need to run these Macros and create these files and save them on the Mac HD Documents

  • My Network Connection Keeps Going SOS

    i have a blackberry 9300 and am on the EE - T mobile network, i have a problem with my phone , its keeps going to sos mode i have tried changing sim card to other networks , calling my provider , even used the same sim card on another phone and it wo

  • The item you are trying to edit has not yet been processed by iTunes Match

    "The item you are trying to edit has not yet been processed by iTunes Match and any changes you make could be lost. Are you sure you wish to continue to edit information?" How long is this supposed to take? I have some tracks that haven't been "proce