Uix question on Master-Detail (Many to Many)

Hello -
I like how, when selecting a record in the master table, the detail table is automatically updated.
How would one replace the master table with a drop-down list (messageChoice) that updates the detail table when a particular master record is selected?
Thanks

hi
its very easy problem
1-in the messageChoice Event handler get the selected index go to master iterator and get that row from the iterator
2-go to the Detail iterator and put a craitira base on that row
by by

Similar Messages

  • Questions on Master-Detail HTMLDB HOW-TO

    Hi all
    I have created a 3 page application based on the master detail how-to given at http://www.oracle.com/technology/products/database/htmldb/howtos/index.html
    Instead of DEPT and EMP tables I have PERSON and PERSON_ADDR tables. The PK of PERSON is the person_id and the PK of PERSON_ADDR is the person_id and addr_start_dt. Person_id column in PERSON_ADDR is obviously the FK to the master table PERSON(person_id).
    At first I had problems trying to create the pages themselves because the wizard always hides the person_id column on all the forms(and I don't want that,even though it is a sequence number I still want people to see it) , it being the PK, then somehow I managed it to display the person_id by replacing the EDIT link with the person_id itself. Now if a person already has an address and I click on EDIT then it copies the person_id values and others to the next page and all looks good but when I try to create a new address it does it ?? (It should take across the person_id as well)
    My PERSON report is on page 1, when I click edit against a person it takes me to page 2 where I can see+change all the person details plus I can see the person_addr details. When I click edit against a person address it takes me to page 3 and I can edit all the address details nicely copied to the new page but when I click CREATE on the page 2, then all the fields appear as NULL on page 3( all the fields but the person_id should be null here). How can I fix this ?
    Also, for my person address I would like to validate the address dates , there should be no overlapping start and end dates for a person's address. How to do this ? I think I will need to create a function to which I pass the person id and the new start and end dates and this function returns error message,if any, or null. I had a play around with validation and I think I need to use "function returning error text", what should I put in the "validate expression 1" box then...just something like
    begin
    my_function(param_1,param_2)
    end;
    If yes, then what variables would store the new start date and new end date of an address.
    Lastly, for every table do I have to user a sequence number or a trigger to define a primary key, what if the primary key is just a character code and I want the users to add it ?
    Thanks a lot in advance !!

    thanks Marc.
    Yes you are right, I used the 1.5 viewlet. I will try the master-detail wizard now.
    With the primary key problems, for things to work nicely in HTMLDB, do you suggest each and every tables should have a sequence number generated primary key ? We have some tables for various statuses like ACTIVE,CLOSED where these codes themselves are the primary keys, so you suggest making these codes unique keys but still have a sequence number PK ? Also when I want the users to enter the primary key themselves I will let them enter new ones but not update existing ones, so data entegrity is maintained.
    I was able to work out how to create validations using "functions returning error text" but my problem is I need to be able to compare what the user has just updated/entered with the data that already exists in the table. I have a table called person_Address having columns like person_id, start_dt,end_dt and various other fields. The primary key is person_id and start_dt and I need to put a validation which avoids any overlapping addresses. Overlap as in there can be only 1 active address for a given start and end date range. Does HTMLDB has something like :new.start_dt the way we can write database triggers ? Please suggest a way to do this.
    Lastly, how does HTMLDB handles error messages raised by table triggers. Can they be shown along with the item on the page as we can with the other HTMLDB validations ? I have many tables with all sorts of triggers and if any validation fails I generally do...raise_application_error(-20001,get_my_message(234));
    get_my_message function returns the message text for message number 234 . Will this message be displayed somewhere or not ? Do I have to duplicate my validations , once in the triggers and then in HTMLDB as well ?

  • 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

  • Question on master detail coordination

    Hi,
    Kindly help me with the following question.
    If a master details is waiting on its Wait for Flow activity, and it has previously spawned few detail processes, what happens when one of the detail processes at runtime didn't execute the Continue flow activity but completed successfully(for example .. due to a comparison activity) and other detail processes executed the continue flow activity and completed successfully?
    Thanks,
    Srini

    Hi,
    I've answered your duplicate post on the Workflow FAQ forum at http://smforum.workflowfaq.com/index.php?topic=599.0
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Questions about master-detail update and delete!!

    I have created a view object with two entity objects.
    These two entity objects map master-detail tables in DB.
    I want to update both tables when the user input, and delete the record in detail table (keeping master table unchanged) when the user click delete button.
    How can I do?

    did you figure this out? i have created VO made out of two updatable EOs and update works fine. But still have issue with deletion!

  • Master Detail questions.

    Couple of questions around master/detail screen.
    I have all the necessary EO/VO/Links etc set up.
    The master is a simple messageComponentLayout with a primary key.
    The detail is an advanced table with a primary key.
    The links are from primary to foreign (altho not defined as such in database).
    When I render the screen my primary key in the master is populated through code in the controller.
    I have initialised both the the VO's (master and detail).
    Here is where I think the problem is. The master looks fine when I render, however the detail queries back what is in the database (all records plus a new one!!).
    When I save the master is created correctly but the detail has no foreign key populated and no primary key populated.
    Questions are.
    1. How do I prevent all the detail records being displayed.
    2. How does the foreign key column get populated, I hoped it would be automatic from the master/detail relationship.
    3. How does the detail primary key get populated. I appreciate I have to code this, where should this be done and when? i.e. at apply or render?
    Regards
    Robert

    Robert,
    in your page design, is user forced to make master record first? Or are you inserting both master and detail rows together in DB? If my first statement is true, how are you populating primary key, is it a sequence?
    Ideally page design should force user to make master record first. Once this is created you have to write code to get the foreign key from the newly created master record and populate the detail records with same forign key.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

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

  • No Master Detail option in Data Control Palette

    No Master Detail option in "Drop as:" dropdown list in data control palette.
    First I create two entity objects with a referential key relation in a business
    components diagram from an existing db schema.
    Than I create two view objects and a view link from the entity objects.
    Following I create an application module with the view objects and the view link.
    The diagram seems correct, it shows the view objects and the view link inside
    of the app module.
    When I create a data page (jsp) in the struts-config.xml I'm not able to
    select the option Master Detail (Many to many) in the dropdown list from
    data control palette due to it isn't there.
    What is my mistake ?
    Many thanks.

    There is no mistake in your side. Thing is actually you cannot use the many to many option for a view object in jsp. This option is available if you are using UIX page. In case of jsp, you could manually create the master table using master view object and create the child table using the detail view object(present as child in view link). In the master table, you can add another column with ADF operation: setCurrentRowWithKey(String). That's it. Now selecting the select link in master table will refresh the child table rowset.

  • Master - detail block (many-to-many)

    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .
    the table Resulted from the relationship is(part_supp)
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.
    I am using form 6i ..
    please help.....

    M3ATH wrote:
    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .Many to many relation between two table isn't a good database design. You have to a junction table between them.
    the table Resulted from the relationship is(part_supp)Is this your junction table(part_supp) ?
    >
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.If part_supp is your junction table between parts and suppliers then, try this..
    Use the junction table as a hidden block, then establish a standard Forms relation between
    Parts and (hidden)part_supp then between part_supp and suppliersHope this helps

  • Many - to - many view links (master-detail)

    Case :
    I have a relation many-to-many between two tables, composed of 3 tables:
    Table Users ( User_Id, User_name ) // Master 1
    Table Groups ( Group_Id, Group_name ) // Master 2
    Table Users_Groups ( User_Id, Group_Id ) // Child (holding then many - many relation)
    Need :
    I want to make Master-detail relation, so that when I change the group (Master 2) the details of the users - user_id, user_name - in this group appear in table below.
    problem :
    All the master-detail examples I have seen in Jdeveleoper, between One - many realtionship, where the details table contain the information to be displayed; now my case that the details to be displayed is in another table (Master 1) not in the child table directly.
    So using ordinary view Link between the a master table and the child table displayes only the Id's of the child table but I need that the names that in (Master 1) table which is related to the selected master id.
    Thankx

    Duplicate of add where clause to detail view in master/detail relation
    Timo

  • Many to many master detail form

    Hi All,
    APEX 3.1.2 on SuSE 10 Oracle 10.2.0.3 64 bit
    I am new to APEX, but used OAS several years ago. Back then I hardcoded all htp.print commands. We are building an intra-team application to track system relationships. For example,
    web interface 3 --> application server 2 --> database 6
    Our tables are similar to the following
    SYSTEMS
    system_id (unique sequence)
    system_type_id (database, app server, apache, etc.)
    SYSTEM_TO_SYSTEM
    publishing_system_id - number
    consuming_system_id - number
    We would like to have a master detail form where we would query database 6 for example, and then see all related systems one level below it (application server 2 in the example above). I have been able to query the related systems and show them in a drop down pick list on the detail form, but I cannot edit them.
    The wizard asked for the primary key of the detail table, which in this case is not a sequence generated value, but a pick from a systems table lookup on system_id/system_name.
    If the master form would automagically lass the system_id to the publishing_system_id on the detail form, and allow me to update that with a picked system_id tied to consuming_system_id, that would be perfect.
    I can write the htp calls I mentioned earlier, but I am sure I am missing something.
    Does anyone have any best practices for this?
    Thanks!
    Steve

    Hi Steve,
    Here is an example which might help you:
    http://apex.oracle.com/pls/otn/f?p=43368:35
    Here, I have used two tables e.g. test1 and test2. Test1 has an id column which is just a sequence column and the name column in this table has a unique key.
    Table test2 has id column as primary key and name1 column is linked with Test1 table on the Form. Name2 column is not required to be linked with Test1 table.
    If this is what you are after, then I can give your more detail for it.
    Hope it helps.
    Zahid

  • Master with many details

    Hello Marvel team and Others,
    Is it possible with thee html db wizard to create a page contaning a master with more than one details ?, I think no , please if No, can I do it manually ? Any ideas are welcome.
    This is my need :
    The same page mmust contain :
    udpatable items for the master
    updatabee report for each detail
    insert details for an existeing master
    delete details from an existing master
    insert a new master with his details
    deletee a master, of course with his details
    Jina.

    The Add Rows button submits the page and re-renders it with additional N rows in that region. Any changes made in that region will be saved.
    Perhaps what you need is some client-side DHTML/Javascript to dynamically add some rows in your tabular form.
    See
    Re: Copy Values From Tabular Form for a discussion about that and an example at http://htmldb.oracle.com/pls/otn/f?p=24317:227
    But all this is straying far outside the out of the box functionality and you have to write everything yourself. You should re-evaluate some of your business requirements before going down this path.
    In other words, having a master-detail-detail, all of them editable, one global SAVE button for all of them, client-side Add Rows functionality, and all on the same page...is a highly unusual UI.
    Good luck.

  • Question of displaying Task Flow Region in Master-Details pattern

    We have a master-details page. There is a region on the details pane along with other widgets and the content of that details pane including the region depends on the row selection on the master table list.
    The first time page loads with no row selection on master table so this details pane displays nothing. When I select one row on the master table and the details pane and its region can display data of the row in master table properly.
    After several selection, I navigate to another page and then go back to this master-details page again, it automatically selects the row which was selected last time. And in the details pane, the region whose content was created basing a task flow call cannot display corresponding data of the default selected row while other widgets in the details pane can display corresponding data properly.
    The reason of having this problem is the region's parameter is generated before the selected row is determined. When the task flow call in page definition is parsed, the parameter of this task flow call is created before component binding of the master table. It means when the task flow call is parsed and generating the parameter, the ADF page believes there is no row selection of the master table because the component binding is null at that time.
    So my question is how to make the this task flow call for that region create the task flow call parameter after the component binding of the master table? Or is there any way to force a refresh of the region/task-flow-call after the render of response? Or is there anyway to disable this "auto-select" on the master table after navigating to other page?
    (My jdev version is JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1 )
    Edited by: user790224 on Sep 6, 2012 4:16 PM

    The reason we are using master-details patter here is it is designed in that way and the region is displaying the data of a selected row there.
    There is no master-details relationship on model layer. But the content of the region is from the result of several other Java API calls which call the task-flow from an external component.

  • UIX Master-Detail  - Find button does not display detail lines

    Hello,
    We have a master-detail UIX page. Master has one attribute only. When 'Next' or 'Previous' buttons are pressed, the next master-detail records are displayed.
    However, when master attribute's value is changed by the user and the 'Find' button is pressed, the new detail lines are not displayed. Also we get following error:
    JBO-26080: Error while selecting entity for <ViewObject>
    Has anyone experienced this issue before?
    Thanks, Ali.

    Please dis-regard this post. The correct sequence is to click on Find button, enter new value then click on Execute button to query new values.
    Thanks, Ali.

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

Maybe you are looking for

  • A total beginner with Blackberry Playbook

    Hello Someone got me a Blackberry Playbook, I certainly accepted the gift even though I wasn't sure what one of these was! However since i got it, I am struggling to connect to wifi?> How can i fix this problem?. I have phoned up the support line whi

  • DVI or VGA Connection For Sharp Aquos??

    I've got an older Sharp Aquos, specifically the LC37G4U. Previously owned a Mini G4, 1.42 GHZ. The best I could do imagewise was with a DVI connection and the Aquos and Mini set to 1280 x 768. This resulted in an image cropping of approximately 1/2 i

  • Multiple terminal windows on multiple views in Subtle WM?

    Apologies if this has already been answered somewhere, but I couldn't find it. I'm using the Subtle WM, and I really love it's use of gravities and tags to position windows. The only problem I've run into is when I have multiple copies of the same pr

  • Question: Migration from Tibco BW to SAP XI

    I have been actively involved in TIBCO BW projects as project co-ordinator for the past year. Now i am thinking of shifting into SAP XI. I am assuming that SAP XI has the same underlying concept as TIBCO BW. Is my assumption correct? If yes then how

  • Mac Mini 2Ghz Core 2 Duo - Upgradeable to 4GB's of Memory?

    I have a Mac Mini with the 2Ghz Intel Core 2 Duo in it, it has PC5300 memory...is this system upgradeable to 4GB's of memory as the current mac minis being sold are? Also, will this run only ddr2 5300 (667mhz) or can it run faster 6400 or even 8500 (