Questions about the reorganization of the rows in the table by drag-and - drop feature

I am referring to the demo: 106. Drag-and-drop the reorganization of the rows of the table in aCorner of Code DF to implement my case.

I am facing some problems:

1. the view object (bound to the table) is read only and it is created directly by very complex SQL queries, without entity objects. When it is run the code: dragRow.removeAndRetain () in the method: DnDAction processDrop (DropEvent dropEvent), it throws the error so that a guest view object is read-only. I want to know if there is another way to delete the moved collection line?

 public DnDAction processDrop(DropEvent dropEvent) {
...       
       CollectionModel collectionModel = (CollectionModel) table.getValue();        
        JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
        
        //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
        //The RowSetIterator allows us to remove and re-instert the dragged row
        DCIteratorBinding departmentsIterator = treeBinding.getDCIteratorBinding();               
        RowSetIterator rsi = departmentsIterator.getRowSetIterator(); 

        int indexOfDropRow= rsi.getRangeIndexOf(dropRow);
       //get access to the oracle.jbo.Row instance represneting this table row
       Row dragRow = (ViewRowImpl)table.getRowData(draggedRowKey);
       //remove dragged row from collection so it can be added back
       dragRow.removeAndRetain();
       rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
      ...
}

2. When you click on a button, I need to save the command results in the database using the command update # of each rank. Here it is the handler method for the event of the action (in MB) button.

I want to use RowSetIterator table for encode it from all ranks and update the value # order of each rank.   I call a data control method to run sql update. is it ok? any suggestion?

    public void processSaveOrder(ActionEvent actionEvent) {
        CollectionModel collectionModel = (CollectionModel) mytable.getValue();        
        JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
        
        //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
        //The RowSetIterator allows us to remove and re-instert the dragged row
        DCIteratorBinding iterator = treeBinding.getDCIteratorBinding();               
        RowSetIterator rsi = iterator.getRowSetIterator();
        Row row =rsi.first();
        System.out.println(0+"="+ row);
        int i = 1;
        while(rsi.hasNext()){
            row = rsi.next();
            System.out.println(i+"="+ row.getKey());
            i++;
        }

    }

A workaround solution was found:

In ADF 12 c, it can be solved by changing Updatable "Always" in the details tab of each attributes to read-only view object without entity object.

Tags: Java

Similar Questions

  • FlashBuilder - how to move the code with drag and drop

    Guys, I must be stupid. Each IDE I worked in allows me to highlight one or more lines of code, and then, when I mouse over the highlighted lines, updates of the cursor to indicate that I can now drag the code, and it moves when I click and drag.

    FlashBuilder (burrito) does not seem to exhibit this feature, but if I hold down the CTRL I do not copy the code via drag and drop.

    There has been one or two occasions where the drag-and - déposer worked, but I can't understand, or reproduce these conditions.

    Can anyone help?

    Thank you

    T

    It should work in Flash Builder, but you are right, that feedback cursor is not very good because it is not updated to show that any sort of slider. Try selecting the text, then click and hold for about a second before you drag it to a new location. If it still does not work for you it must be another problem. Make sure that in preferences, general-> editors-> text editors "Enable drag and drop of text" is turned on.

  • How can I fix the "drag and drop" feature in Windows 7? It used to work, but now does not work, for no apparent reason!

    How can I fix the "drag and drop" feature in Windows 7?  It used to work, but now does not work, for no apparent reason!

    What happens when you try?  Make sure you drag the icon image and not the text of the name.

    If it still doesn't work there are some registry changes that can try to alleviate the problem.  But because the changes to the registry are tedious and dangerous, I recommend to leave the system to repair it for you.  Here's how:
    1. Type of restore in the search box of the start menu to find and open to restore system files and settings from a restore point.
    2. Click Next, choose a date before the problem started, then click Next once more.
    • This process only takes around 2 minutes and only restores your system files/settings: it will not affect any of your files, documents, photos, emails, or anything else.
    If the system restore does not resolve the problem try this to replace missing or corrupted system files.  Here's how:
    1. Type cmd into the start menu search box, and then press Ctrl-Shift-Enter to launch as administrator.
    2. At the command prompt to start the File System Check, type sfc/scannow .
  • I lost the ability to drag-and - drop files from the finder to dreamweaver

    I've recently updated to OSX Maverick and I lost the ability to drag and drop files into dreamweaver.

    Is there a setting that I know that restores this functionality?

    Thank you

    Hello joyridebs & Mike,

    This seems to be due to changes in the Mavericks. A bug was noted for the workflow broken in Dreamweaver.

    Please follow the workaround by inserting objects from the panel insert until the bug is fixed.

    Kind regards

    Yalpi Shiva Prasad

  • A few questions about the use of data and Cliq

    I have the cliq, however I chose to not get 3G (so I bought full fare). So I have a few questions about the phone and the use of 3G / 2 G/Edge:

    1 - is possible to disable completely the 2G / 3 G/Edge? I know you can switch between them, but are anyway just tell the phone to stop using them altogether since I'm not subbed to the service?

    2. when the update takes place, I guess we'll have to reconnect motoblur and etc, but if I don't have 3 G will I have motoblur connection problems after the update? Or he keeps the latest wifi settings so that it would connect to wifi to connect. When I first got my phone it was not a problem b/c I had 3G for the first month.

    I hope that makes sense, thanks!

    To stop all the data, I would like to download an application called APNDroid. He cut them all down. When you log on to blur you have 3G or WIFI doe this without getting a timeout error. During the process of setting up your Blur account, you can press the menu button and set up your wifi to work, this will connect you to Blur and your phone will be connected to the blur. If I were you I would be rethinking to do a data plan since you are really losing out on most of your main features of phones. It's your choice, however.

  • Question about the guest of dashboard and column

    My question about the dashboard and column prompt:


    (1) prompt dashboard usually work with only for columns that are in the topic area. In my report, I have created some of the columns that are based on other columns. As I have the daysNumber column that is based on two other columns, because it calculates the difference between two dates. I can't find this column invites when I create dashboard. I need to make a guest on this column.

    (2) to one of the column, I have only two values 1 and 0. When I create a prompt for this column, is possible that falling of drop down it displays 'Yes' of 1 0 and 'No' and always filter the request?

    Hello...

    I forgot to tell you one thing... but performance wise... If you create the column in RPD itself, it is good and easy to maintain.
    If you want this feature also... once again you choose directly the column in the area of topic... ;)

    Thank you & best regards
    Kishore Guggilla

  • Display collection ArrayCollection in a list and the ArrayCollection with Drag and Drop collection reorgnize

    I have an ArrayCollection collection created like this

    qaAC = new ArrayCollection();

    for (var i: int = 0; i < 10; ++ i) {}
    var o: Object = {question: ' what is "+ i +"? ", answer:" it's "+ i"};
    qaAC.addItem (o);
    }

    The ArrayCollection collection is an array of object that has properties "question" and "answer to" custimized.

    I want to put 'issues' in the ArrayCollection collection in a list. 'qaAC.question' does not return an array of questions for me.

    I have to extract the ArrayCollection collection to form a new String table, and use the new array as the dataProvider of the list of questions.

    Is there a way better and clean?

    My goal is to use a list to reorgnize an ArrayCollection collection that contains complex objects (not simple string) with Drag & Drop. Is this possible?

    Any suggestions?

    I put two lists in my example to show how the ArrayCollection collection could be displayed in two different ways. You don't have to have two lists if you do not need them.

    When you change the order of the list made with drag and drop, you change the order of the collection ArrayCollection qaAC, so all the controls that display the qaAC will also be updated to reflect the new order. You can test this in the example I posted earlier. Change the order in the list of question and you will see the order change also in the list of responses. This is because they are both bound to the same collection of ArrayCollection. If you want to behave independently, you need two separate ArrayCollections.

    Chris

  • The show with drag and drop in Captivate 9

    Hello

    I am creating a drag and drop interactivity 9 Captivate. In step 3, when I had to drag the objects from the source to the drop target, all objects in the screen were locked. I couldn't click as well as she was listed on the timeline . Please suggest.

    Using the wizard or the D & D Panel? Is this normal or a receptive

    of the project? You are on Mac or Win.

    For the wizard: .you should see a center point on each source of drag.

    You must drag a line from this central point to the drop target. You did

    create a type?

  • How to create the Table using the column Drag and Drop feature

    Hello:
    I'm new to Data Modeler tool Oracle SQL dev and would like to know if there is a way to create a new table by reusing existing columns or groups of columns. The idea is to maintain consistency and save time of table design. If the columns created previously can be reused and require, drag and drop column in the right pane, then only new columns must be created manually.

    Any thoughts on this will be appreciated.

    Thank you!

    Yes - just change the name of the model table in the script (t_name = "table_template") then save this new transformation for later use.

    I don't know how to apply only some of the tables. Seems like something you could do to a secondary view level?

    Perhaps someone else on the forum can advise how to change the script to work on a subview only instead of the whole model.

  • How to rotate the movieclip with drag and drop?

    Hello everyone,

    I work with drag and drop game.

    I'm done with drag and drop. now, I have problem in totating the movieclip.

    I want video clip rotate using the mouse. Do not use the click mouse. !!!

    Can someone give me a solution for this?

    var isDrageen:Boolean;

    var lastX:Number;

    var derriГЁre: Number;

    var dragX:Number;

    var dragY:Number;

    stage.addEventListener (MouseEvent.MOUSE_DOWN, down);

    stage.addEventListener (MouseEvent.MOUSE_UP, up);

    stage.addEventListener (MouseEvent.MOUSE_MOVE, mov);

    function down(e:MouseEvent):void {}

    isDrageen = true;

    lastX = mouseX;

    derriГЁre = mouseY;

    }

    function up(e:MouseEvent):void {}

    isDrageen = false

    }

    function mov(e:MouseEvent):void {}

    {if (isDrageen)}

    dragX = mouseX-lastX;

    dragY = mouseY-derriГЁre;

    MC.rotationY += dragX/1.65;

    MC.rotationX += dragY/1.65;

    lastX = mouseX;

    derriГЁre = mouseY;

    }

    }

  • question about the scope of variables and memory

    I searched the Adobe documentation for an overview, but apparently, I'm not in the right place.

    Here is an example of simplified code:

    < AS >

    loadedImages:Array = new Array();

    function createImageData(imageNumber:Number):void
    {
    var imageData:BitmapData = new BitmapData (width, height);

    Switch (imageNumber)
    {
    case 1:
    imageData.draw (loader1.content);
    loadedImages [imageNumber] = imageData;
    break;

    case 2:
    imageData.draw (loader2.content);
    loadedImages [imageNumber] = imageData;
    break;
    }
    }

    < virtue >

    ImageData defined inside the function createImageData(), I know that I can not access any outside level of the function block.  But what about memory?  ImageData still exist once the code has "left" the createImageData() function?

    For example, if the function above is called twice (once with imageNumber = 1, once with imageNumber = 2), what I remember?

    -BitmapData objects stored in loadedImages [1] and loadedImages [2] and 1 BitmapData object named imageData

    -BitmapData objects stored in loadedImages [1] and loadedImages [2] and 2 BitmapData named imageData objects

    -BitmapData objects stored in loadedImages [1] and loadedImages [2] and nothing else

    Is there a way to see the 'elements' in memory, not just the quantity?

    If you call twice createImageData, for imageNumber = 1 and imageNumber = 2, there will be only 2 persistent objects to the Bitmap in memory, and they will be made by the loadedImages table. The imageData variable is just the first to receive the pointer to the allocated memory and past him on the elements of the array until it's life is over. Only when you delete the table, you will release the objects for the GC.

  • Questions about the standard wireless keyboard and mouse on a h8 - 1360 t.

    Hi again,

    I have a h8 - 1360t with the standard wireless keyboard and mouse.

    1. where is information on the blue buttons 'connect' keyboard and mouse?

    2. the mouse has a power switch - do I really have to close each time, or is there a function of inactivity when the system is off?

    3 lets say that I have two exact systems within 5 feet of each other. Will the two keyboards and mouse conflict?

    Looking forward to your answers.

    Thank you

    BJ

    This document will show you how to sync mouse wireless and keyboard if they connect buttons.

    You don't need to turn off the wireless mouse. If you have problems with the batteries run out frequently, it might be useful, but I've never needed to do.

    Two different sets of wireless mice/keyboards are not usually a problem. If there is a conflict, go through the process of connection of each game.

  • Question about the browser inside "sandboxie" and download to save an attachment?

    Hello

    I am very new to sandboxie. So please excuse my ignorance.

    I have the browser open inside sandboxie where I'm going to my gmail. I have an email from my son with a photo attachment. I have no trouble to consider this picture.

    However, I just found out that I couldn't save this picture on my computer HD. In sanboxie E-mail when I chose to save it in a folder in my computer HD shows like saved but when I close the browser and open my folder where I saved the photo allegedly - I can't find anything...

    So I guess that's the protection offered by sandiboxie?.  So if I need to save items of all reliable e-mails, I open my browser off sandiboxie to run my download?

    Concerning

    Snow,

    Yes, one of the goals of Sandboxie is to keep isolated... things so that, if you have accidentally downloaded a virus, he would be stuck in the sandbox [rather than infect your real system].

    Right-click on Sandboxie icon in your system tray, select Show THE WINDOW, the sandbox SAND SANBOX SETTINGS tab, DEFAULT ZONE.   On the left, click on the + sign of RECOVERY, to develop to reveal a QUICK RECOVERY.   You should see several locations of files listed there... perhaps including DOWNLOADS, DOCUMENTS, FAVORITES, or DESKTOP (even though I think some of your own peut be different).    You can add other folders of your choice.   These 'Fast food' files indicate the main areas where you want THAT Sandboxie really save files on your drive.

    It is spirit, back to your email address and see if you can direct download of your photo accessory in one of these files in particular.   When you do, you should see a popup of Sandboxie, indicating that the file is eligible for recovery, which means that it can be moved out of (side) of the sandbox.   I said in general to recover in the same folder (on my real system, as it was tyring to save in the sandbox).   And click on the RECOVER button.   If get you there, it should do the trick.

    There may be other ways to do it... but this method works for me.

    Also (now that you know where are the settings), there should be a setting to ask you to empty the sandbox when you exit the program... and it should also let you know that you have lingering there files which will be lost if saved.

    EDIT: actually, I just closed my browser sanboxed, not through QUICK-picked UP a file... and I get a screen to DELETE the CONTENTS of Sandboxie, again reminding me that I can still get the file [or well, delete the content of the Sandbox].   Certainly, it's been a while since I have set up the program, so I don't remember if it was a default option, or something I've tweaked.

    Edit2: There is a short tutorial for using Sandboxie http://www.sandboxie.com/index.php?GettingStarted , which if you have the time, elaborates on this (in parts 4 and 5 of the tutorial).

  • Question about the formula of Member and BegBalance

    I have a requirement where I need to calculate the value of '' suffering '' and need to save it somewhere so that I can use it to display on the dataforms.

    The logic of the last value Due must be--

    Suffering = year previous year Total + current (Jan: Prior month)

    I was planning to write a formula for this member. Can I use substitution variables, as title, etc. PriorMonth in the form of Member to achieve this?

    In addition, since we do not use BegBalance Member for purposes like the display on the dataform etc. can I use for this requirement where I can write the formula of the BegBalance member and give it an alias name 'Suffering' I can use to show on the dataforms. Is this possible?

    Please let me know. All entries are appreciated.
    ~ Hervé

    Hello
    Perhaps it should look like this:
    & priorYr-> YearTotal+@sum(jan:&currMonth);
    / * No need to specify the current year as it would be fixed in pov, column or page. If necessary, replace the sum with @sumrange(&currYr,jan:&currMonth) * /.

    See you soon,.
    Alp

  • Questions about the synchronization between output and analog input

    Hi all

    I now have a simple task which head a signal voltage (from PXI ao0) on a circuit and then your comments a voltage at the terminals of a component, for example, that one of the resistors in the circuit, through ai0 on PXI. So in this case, the synchronization between analog input and analog output must be made to avoid error of phase shift.

    I tried to build my VI by learning this example: https://decibel.ni.com/content/docs/DOC-3882

    However I have a few questions.

    1. I noticed that there is a merged error fed the "start task" sub VI for the analog output.  What is the point of fusion to mistake?

    2. I enclose my VI (also shown below) for the output voltage. I put my writing of DAQmx Subvi in the while loop so that I can change the voltage while the VI is running.

    However, in the example, the author has been reading outside of the loop and before even the start task. What difference will it make?

    3. I have also attached my synchronized VI. I always put the wavegeneration and the DAQmxwrite in the loop. A bulging guard error saying about samples is not available and needs to a higher sampling rate or a longer wait time. What causes this?

    I appreciate that these problems can be solved. Thanks to you all.

    (1) first you need start the task of acquiring, he'll wait for trigger here. And then you start the build task that provides this trigger. If acquisition could trigger and never start.

    (3) you must first write something in the buffer (writing DAQmx), then only you can generate it (Daqmx Start).

    Check Cont Gen tension Wfm - Int Clk - no Regeneration.vi in the help-> examples for example.

Maybe you are looking for

  • Satellite C660 - 1 MM-wireless network adapter is very slow

    Hello! I bought a Satellite C660 - 1 MM and I have 2 problems. The first is that there is no C660 notebook - 1 MM on Toshiba sites, but I could find drivers with the PSC1NE thing. The biggest problem is that the card WIFI (atheros) is very low (or sl

  • How can I reduce the size of the screens viewed on my computer.

    Sometimes, I get a screen which is higher then my computer screen so I can't see or click on the bottom of the screen action buttons, maximize on upper rt button is gray and doesn't fix it.  y at - it a general command to reduce the size of the scree

  • How to develop BlackBeery Ui

    I want to develop the UI for a screen which I join... on ehelp me please to write code for the user interface

  • HP LaerJet 5 does not not under Windows 7

    Hello Currently, I've migrated my laptop Dell Vostro 1015 from Vista 32 to Windows 7 Ultimate N. Everything was fine, except the connection with my old HP LaserJet 5. The system rejects the printer during the initial start of the printer. It seems th

  • Lightroom backup

    HelloI have 5 Lightroom on Windows 64-bit and you have a question about the backup of catalogs in lightroom.I had little space on my pc, so once I changed myphotos, I want to take on the other hard drive with the settings I made in the lightroom. Is