ADF-Newbie.How can I create a many-to-many row from an action method?

Hi all,
First of all, this is my scenario:
- JDeveloper 10.1.3.0.4
- My application is running ADF + Faces + Toplink + EJB Facade
- My database model includes some many-to-many relationships and some one-to-may relationships.
I have developed several ADF pages displaying some CRUD operations over my master tables and my master-detail tables without any problem.
I am now trying to implement some CRUDs over my many-to-many relationship tables.
Lets call the tables involved as master1, master2, and relationship (the many-to-many table)
Because usability reasons, my user wants me to implement an interface where he can:
-Select a row from the master1 table
-Select a row from the master2 table
-Click a button called "Create relationship"
I need to implement the code inside the action button to add my new record on the relationship table, and honestly, I have not found any clue.
Please, give me some directions to solve my problem.
Thank you in advance for your help...

The key here is to work with the intersection table for your MtM relationship.
The way I do it, is to have the user view Master Table I, and click on the add Relationship button, this button is a link to a add form for the Intersection Table. On the Add form, the MasterTable 1 Id is already filled in and I hide it. I then setup MasterTable 2 as an LOV on the page. The used selects the item from the LOV and clicks on the commit button. I refresh my many-to-many view and all is grand.
Using ADF/JSF, I have made it even nicer by turning the add relationship page into a dialog page, that way the user can see the previous page while adding the new relationship.
Kelly

Similar Messages

  • How can I create a master PDX that pulls from multiple other PDXs?

    I process aviation maintenance manuals, with the individual manuals having their own PDX. How can I create a master PDX that pulls from the individual PDXs?
    I have access to myriad versions of Windows and Acrobat so there's that...

    I’ve got 100s of manuals each with their own PDX. I’ve been asked to create a master PDX that in effect combines all of the individual PDXs into a single (cross-manufacturer, cross-fleet, cross-manual-type) searchable PDX that can be easily updated.

  • How can mass create batch classification for many material batches? ?

    Hi Experts,
    In our system , there are so many material batches which have not been classified,see by
    BMBC Tcode.
    That means these batches has no values in the batch class. I know we can create
    classification for these batches with MSC2N Tcode.
    But there are so many batches  which have not been classified,more then 2000.
    It is not possible to create classification for every batch with with MSC2N once a time.
    So how can I create batch classification for so many batches once a time?
    How can I mass create batch classification for so many batches??
    Thanks for any reply!

    Hi,
    Please be aware that SAP does not support the use of batch
    input in the classification system. SAP recommends you use BAPI's for
    example in your case BAPI BAPI_OBJCL_CREATE and BAPI_OBJCL_CHANGE
    would be able to help. For more information, please have a look at the
    note: 943559 - Point 2 and 13. Point 13 references the note 1083986.
    I hope this helps!.
    Best Regards,
    Arminda Jack

  • ADF & JSF : how can I create a clickable  image

    Hi,
    How can I create a clickable object with an image property and have an action, I want to use it instead of a command button.
    thanks,
    Ahmad Esbita

    Hi Ahmad
    One way is to drop an objectImage tag inside a commandLink tag without a text attribute as follows:
    <af:commandLink actionListener="#{backingBean.someMethod}">
      <af:objectImage source="/someimage.gif"/>
    </af:commandLink>The image is clickable raising the actionListener event.
    Hope this helps.
    Regards,
    CM.

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How can I create a diagram where equal data from different cells will be added to one sector?

    Hi,
    I'm a new Mac user, so I have a lot of problems and questions every day. Moving to Mac from PC is not an easy thing)
    Here is my problem:
    I need to create a few diagrams for my science work, but can't correct one mistake. Every time one data from one cell from the table takes its own place in the diagram. But I need to ceparate equal data to show it is one section.
    An example:
    Sex
    Age
    Female
    18
    Female
    18
    Female
    18
    Female
    25
    Female
    30
    We need to create a diagram to show that we have
    60% - 18 years
    20% - 25 years
    20% - 30 years
    But Numbers doesn't show it that way. Here how it does:
    So please help me. How can I do that?

    Hi ProCauda,
    Some example data of people and their age:
    The COUNTIF function will give the number of people of each age.
    In another table, B2 contains this formula (and Fill Down to the bottom of B)
    =COUNTIF(Table 1::B,"="&A2)
    In this example, 3 people are 18 years old, 0 people are 19 years old, and so on. Use this table to calculate each age as the % of the total, then use that as the data for your diagram (graph, chart).
    Regards,
    Ian.

  • How can i create a grid with summary row

    Hello Professionals,
    I'm wondering how could i create a grid like the grid below, i want to create a grid with summary row,
    i have tried to create it using collapsing but it didn't work as required.
    Any suggestions?, i want to know just the starting point so i can make deep investigations.
    Thanks in Advance,

    Hi Karem,
    this can be achieved by just assigning a datatable containing the data plus some formatting of grid. Meaning there is no feature for that.
    The datatable can be filled manually or by sql query. Then you have to attach some events for updating the values ( validate after for gid item ).
    A small example for a sql query showing last month quotations and orders with summary :
    select 1 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from OQUT where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    Select 2 as Sort,'Summary ( Quotation ) : ',sum(DocTotal), convert(varchar,  DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar,   GETDATE(),104) from OQUT where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    select 3 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from ORDR where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    Select 4 as Sort,'Summary ( Order ) : ',sum(DocTotal), convert(varchar,  DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar,   GETDATE(),104) from ORDR where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    ORDER by Sort
    regards,
    Maik

  • How can I create a function of sound volue from time using AudioQueueBufferRef??

    I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
    Here is the code where I analyze Buffer.
    {@synchronized(self)
    if ([self isFinishing] || stream == 0)
    return;
    inuse[fillBufferIndex] = true; // set in use flag
    buffersUsed++;
    // enqueue buffer
    AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
    fillBuf->mAudioDataByteSize = bytesFilled;
    // ======>in this place I analyze Buffer
    if (packetsFilled)
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
    else
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
    when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
    as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
    just for comparison
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • How can I create and design a page UI from blank page in jdev10g?

    Hi.
    How can I implement a page from scratch page?
    I can create a master-detail page as the OBE site.
    But I'm not sure how to create page using component pallets, instead drag data-control model to page.
    It means I should design UI with component pallets,
    How can I do?
    Thanks.
    Edited by: user10615931 on 2009-8-18 上午4:13

    Thanks.
    It is helpful to me.
    What I want to do is use component pallets and add action to the component for creating a page instead using executeWithParam operation and drag view object from datacontrol to create page.
    How can I do?
    Thanks

  • How can I influence the JAX-RPC response message from a void method

    Hello,
    I used WSDL2Java to create a web service. This service seems to work but the xsi:type="somename" attributes are not included in the response. I want to get them in. Or, otherwise, I want the push webservice just to send an acknowledge message. Because, our client that's pushing the webservice message to us gets error messages.
    But, while the webservice is a push service I don't know how to influence the returning soap envelope. This is the webservice method I mean:
    public void putDatex2Data(eu.datex2.schema._1_0._1_0.holders.D2LogicalModelHolder body) throws java.rmi.RemoteException {
    //the code
    Furthermore, has someone good examples of implementations that help to get the real incoming XML message data in a easy way.
    Thanks.

    No, that's not a feature of the phone.
    You can submit feedback to Apple requesting such a feature here:
    http://www.apple.com/feedback

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • Newbie :  How can i create 2 users with the same name on diff domain name ?

    I have two domains on my server
    exemple1.com
    exemple2.com
    and i want to create one user for each domain with the same name
    [email protected] and [email protected]
    curently i can create one user, and it's the same user for both domains :-/
    how ?
    thanks
    Hète

    I must say. I am equally curious about this. i've played a lot in Communigate and it is easy to do there but how does one do this in apple mail?

  • How can I create a rollover drop down menu from a link in Dreamweaver CS5?

    Hello all,  I am working on a portfolio website and I was just wanting to know if there is any way that I can create a drop down menu from a text link that cascades once the cursor has made contact with the link. I would like to have it in my navigation bar where the Portfolio link is. Basically, my navigation bar looks like this : Home | Resume | Portfolio | Contact. I only want three items on the drop down menu beneath the portfolio link: Traditional Art, Photography, Graphic Design. I would really appreciate any help I can get! Thanks!

    Have a look at what Nancy does http://alt-web.com/DEMOS/CSS-Horiz-menu-2.shtml

  • How can I create a camera profile in LR4 from my camera

    I have a 5d mark 2, and I created a custom camera profile that is ideal for me, however when I shoot raw it only gives me the adobe, and camera standards etc. Is there a way that I can take my user setting on my 5d and transfer it into lightroom??

    The camera profiles are only applied to the in-camera JPGs, never to the Raw files.
    This is not only so for your Canon but for every camera that shoots Raw.
    For creating a camera profile in Lr, see here:
    http://help.adobe.com/en_US/lightroom/using/WS939594D8-4279-41b4-B8E9-B06BC919EC7C.html
    http://forums.adobe.com/message/4939724
    http://dpbestflow.org/color/camera-profiling

  • How can I create a ringtone using a song from my itunes library?

    I have installed a number of ringtone apps for my iphone to create a special ringtone. I have followed all the steps adding the tune to my itune library, but am unable to complete the final step of moving the tune from the library to 'tone' and then syncing the tune to my iphone as a ringtone. Any suggestions would be appreciated.

    In iTunes pref>General - is the Tones option enabled?
    When you plug in the Device - from the DEvies window go to the Tones tab at the top and select the Tones that you want to laod on the iPhone.
    MJ

Maybe you are looking for

  • My iphone 5 is not being detected on itunes

    just bought an iphone 5 second hand and it wont show up on itunes. my partners iphone 5 is showing up but not mine. ive tried differnt usb port and turned lap top off and on. can someone help me please

  • Access file object from flex web app

    Hi all, I want to access file object from flex web app. What should i do? I have to take array from my XML. In XML there will be only dir path. So for taking file name from dir i have to access it and have to perform for loop on that dir. What should

  • /4xx wage type error in Payroll Reconciliation Report - wta C941

    We recently updated our 6.04 system to SP74.  Now when we run a Payroll Reconciliation Report with wage type application C941, we get a hard error message as follows:  "You must include the corresponding  /4XX wage type".  Also same error on CCW2 and

  • Are 3

    hi, i'm unable to print are 3 even print preview is not coming IN TOCDE J1IA302 pl let me know is this the correct Form J_1I_ARE1 for o/p type J1IB

  • Advanced Search Web Part

    Hi Everyone, Does anyone know where I can find the Advanced Search web part in 2013? I have used this web part many times in SharePoint 2007 and 2010 but can't seem to find it in 2013. Did Microsoft remove or rename it? Any help would be greatly appr