Multiselect drag and drop in ADF

Hi,
Is there any way I can implement multi select drag and drop in ADF.
Currently I have a UI where I have several cards. Each card is built using panelStretchLayout and I can drag and drop each card.
The requirement is to be able to select multiple cards and drag and drop. Is there any way I can achieve this using ADF.
Thanks,
Rajesh.

Hi,
For the drag source and drop target previously i have used action="MOVE". I tried with action="COPY" (default action) and it worked out.
<af:dragSource actions="COPY" discriminant="DnDDemoModel"/>
<af:collectionDropTarget actions="COPY" modelName="DnDDemoModel"
dropListener="#{EditMyWorld.editWorkflow}"/>
Edited by: Priya on Jul 5, 2011 8:42 PM

Similar Messages

  • Drag and Drop Functionality in ADF

    Hi, i have a cuestion,
    I need to develop an application, but i have to determine if it is possible.
    I explain..
    I have to make an applicacion with elements with drag and drop functionality, i mean.. 3 to n containers on the page, a toolbar, with the possible elements to drag and drop on the containers,
    later on i have to join that elements with lines, and to save the view, so, when the users open their workspace, they can see their last view saved state.
    In a few words, that's my issue.
    I ve been search about it, and i found something about drop target option about panel box componnents, but nothing about drawing lines and saved view states.
    Do you know about some examples, o an example application, any help resource will be wellcome
    Thanks in Advance!!!!
    AB

    There isn't a "painting" function built-in.
    You can do drag and drop in ADF Faces between components though.
    If you want to show relationship between components with lines - you might want to look into the Hierarchy Viewer.
    http://jdevadf.oracle.com/adf-richclient-demo/components/ariaXml.jspx

  • Can  we have drag and drop functionality in xcelsius

    hi,
    i want to know wheather we can give adding and removing columns functionality to the user like we can give in the dash board created in wad.because most users want to analyse in their own way along with the standard one we show initially.
    can anyone tell me some features which are best in xcelsius than in wad or visual composer.
    so that it will be easy to choose what is the best tool according to the endusers requirement.

    There isn't a "painting" function built-in.
    You can do drag and drop in ADF Faces between components though.
    If you want to show relationship between components with lines - you might want to look into the Hierarchy Viewer.
    http://jdevadf.oracle.com/adf-richclient-demo/components/ariaXml.jspx

  • Drag and Drop from outside ADF

    Here's what I want to do. My ADF app is going to be hosted inside an IFrame of another app. I'd like to be able to drag items from the other app into my ADF app and drop them on a specific target item. But now, as soon as I drag the pointer over the edge of the ADF app, the pointer becomes a no-drop icon, even over areas that should be droppable. Is there any way (easy or difficult) that I can enable this functionality? All advice welcome!

    My external containing app is not an ADF app, so af:inlineframe doesn't work.
    I've been looking at a page (http://www.codeproject.com/KB/scripting/DragDrop_Part-2.aspx) that does drag and drop across iframes in ASPX. The basic idea there is that the "ondragstart" event actually populates a field in the parent with the "what's being dragged" info, and then the "ondrop" event in the target retrieves that information using javascript. The problem I'm having with my ADF app is that as soon as the mouse starts over my ADF app, the drag pointer goes away and the drop event never arrives. If I could get it to arrive, I can definitely get to the data with javascript.
    So any assistance on this front would be useful. Is there something I can hook into to tell ADF not to cancel the drag/drop?

  • Moving Rows in ADF Table Using Drag and Drop

    I implemented a drag and drop functionality it works fine, I want to accomplish the following functionality:
    The user selects the rows and what if he drags the selected rows and wants to move to section beyond the limit of the table I want to scroll the table in the direction the user is dragging.
    I think it should be a default behavior in the ADF table but it doesn't, could you please anyone tell me how to scroll the table while dragging the selected rows?
    Thank you,

    What make you think that this is a default behavior?
    Adf tables a data bound. So the data appears in an order (mostly defined by a sort condition on the db).
    Even if you implement this behavior (which is possible but hard to do) you loose the new order by the next round trip to the db.
    You may try to use trinidad tables but then you don't have the drag & drop featur (I guess).
    Timo

  • ADF Drag and drop event inside the single af:treetable

    Hi Experts,
    I have a af:treeTable in my ADF web project and i would like to implement the drag and drop event to the same tree table for supporting my sample test project use case. Currently i am facing some issue to get the source tree node and the destination tree node of the drop and drop event inside my drop listener method. How can i get those object since i need to perform some business operation inside the listener. Please note that i am not using ADF BC4j in my project. The service layer is implemented as EJB and it's being called from the backing bean.
    Looking forward some guide lines to resolve this issue from you experts.
    Thank you.

    It's not a perfect solution, but a work in progress that i'm currently using in my backing bean:
    private RichTree navTree;
    private void exitContainers() {
    boolean success = false;
    while (!success) {
    try {
    navTree.exitContainer();
    } catch (Exception e) {
    success = true;
    private void clearDisclosedRowKeys() {
    if (navTree != null && navTree.getDisclosedRowKeys() != null) {
    RowKeySet rks = navTree.getDisclosedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    exitContainers();
    List<Integer> rowkey = (List<Integer>) rksIter.next();
    List<Integer> newRowkey = new ArrayList<Integer>();
    for (Integer row : rowkey) {
    if (navTree.isRowAvailable(row)) {
    navTree.setRowIndex(row);
    navTree.enterContainer();
    newRowkey.add(row);
    } else {
    // Row is no longer available
    break;
    if (newRowkey.size() == 0) {
    rks.remove(rowkey);
    } else {
    rowkey.clear();
    rowkey.addAll(newRowkey);
    Whenever you make a 'delete' or 'move' in the tree, call clearDisclosedRowKeys(), it will remove anything that's no longer valid, so your tree won't collapse, and you won't get the error anymore.
    I took out my logging and debug statements, but essentially this just gets all the rows, checks to see if they're valid, and if so creates a new RowKeySet with the valid rows in it.
    Of course make sure you have the setNavTree and getNavTree accessor's created and that they're bound in your JSFF, otherwise navTree will always be null.
    I haven't yet found a way to 'nicely' find out if you're at the top level container, so i'm relying on an Exception to occur to give me that information, if anyone knows a better solution please feel free to share it.

  • ADF Button components: How to disable drag and drop [SOLVED]

    Hi everyone
    I need to develop an application which allows not the user to drag and drop button components. I've converted every single af:commandbutton to h:commandbutton, to prevent this behaviour, but a huge lot of other problems arose from this "solution". I'm using JDeveloper 10.1.3.3.0.4157, and I'm a beginner, so please be patient with me.
    Thanks in advance.

    Maybe I've drifted off-topic with this, but I found the way to achieve this. The only limitation is that the change must be done on the client's computer. The drag and drop feature can be disabled by going to the about:config page in Firefox, and setting nglayout.enable_drag_images to false. It can also be done in a more "portable" way by creating a user.js script in the profile folder and setting it from there. Thank you all for stopping by and reading.

  • Drag and Drop; What row is my drop positon (ADF 11g)

    Hello!
    I have a request for an drag and drop - site. First a test the technic with the examples in the web - great feature, but by my request i have one great problem.
    facts:
    two pannels, in all pannels are one af:table with different data controls
    - in the first pannel/table (source) i defined on a column a client attribute and the attributeDragSource
    - in the second pannel/table (goal) i defined on a PanelGroupLayout (surround a column) the dropTarget (inclusive dataFlavor)
    I definied a session-scope class and write the methode "public DnDAction handleItemDrop(DropEvent dropEvent)"
    Till then its work sucessful - the methode will be called and the transfer data can be read.
    problem:
    - I need the row for the drop position (for manual queuing).
    - I have found the component, the id of the component, the x and y - position of the drop.
    - A try with the current row of the IteratorBinding what returned the last marked row in the table, not the drop-position.
    I need a key (at best the value of a row.binding.Value) of the drop position in the table.
    Any idea - a simple code example?
    Harald

    Hi!
    My problem was not the correct component ... this information was already available, my problem was the correct row in the component.
    In the meantime I have found a result, i not sure it´s the best, but it works.
        public DnDAction handleItemDrop(DropEvent dropEvent) {
            System.out.println("demo1.java - handleItemDrop");
            try {
                DataFlavor<Number> d = DataFlavor.getDataFlavor(Number.class);
                //get drag Value
                Number dragValue = dropEvent.getTransferable().getData(d);
                if (dragValue == null)
                    return DnDAction.NONE;
                else {
                    // get the current record
                    ELContext elContext = FacesContext.getCurrentInstance().getELContext();  
                    // creating value expression with the help of the expression factory and the ELContext  
                    System.out.println("Component/Id of the drop value:"+dropEvent.getDropComponent().getId());
                    System.out.println("Value of the drop value (PK of the row):"+dropEvent.getDropComponent().getValueExpression("value").getValue(elContext));
                    // and now work with the available data
                    return DnDAction.COPY;
            } catch (Exception ex) {
                System.out.println("item drop failed with : " + ex.getMessage());
                return DnDAction.NONE;
        }

  • Drag and drop features on adf faces

    Hi all,
    I was toying around with the drag and drop compenents, like Duncan Mills describes it in his blog (http://groundside.com/blog/DuncanMills.php?p=574&more=1&c=1&tb=1&pb=1).
    Anyway, I tried to implement that feature between 2 tables. One attribute on the second table is draggable to the first table, of course in their right columns, to replace old attributes. Both are just ouput text.
    I run the page. Of course it doesn't work. I get this message :
    ATTENTION: DataFlavorTag must appear inside class oracle.adfinternal.view.faces.taglib.dnd.AbstractDropTargetTag not class oracle.adfinternal.view.faces.unified.taglib.data.UnifiedColumnTag
    And when I encapsulate the dataFlavor in the dropTarget tag, JDev throws an error.
    Well, maybe that's not the issue, because one is a warning and the other and error. But I was wondering, maybe it is a bug.
    Regards

    Have you got a simple drag and drop case working. E.g. from input text field to input text field just be assigning a dragSource and dragTarget to two items?

  • Why does not drag and drop work?!

    Hello,
    I am trying to implent a drag and drop from a table to an icon representing a trash.
    The drop handler fails in converting the selected rows to a list:
    com.sun.el.MethodExpressionImpl@87d9c00d javax.el.ELException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
    Could you help me to understand why? Below are the details.
    This is the af:table:
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{bindings.MyView1.collectionModel}"
    rowSelection="multiple"
    columnStretching="last"
    horizontalGridVisible="false"
    verticalGridVisible="false" fetchSize="-1"
    autoHeightRows="6" width="190"
    disableColumnReordering="true">
    <af:column sortable="true" headerText="Entry" id="c1"
    align="start">
    <af:outputText value="#{row.Description}" id="ot1"/>
    </af:column>
    <af:dragSource actions="MOVE" defaultAction="MOVE"
    discriminant="delete"/>
    </af:table>
    This is the drop area:
    <af:image source="Images/empty_trash_32.png" id="i2">
    <af:dropTarget dropListener="#{backingBeanScope.DropHandlerBean.dropHandler}"
    actions="MOVE">
    <af:dataFlavor flavorClass="org.apache.myfaces.trinidad.model.RowKeySet"
    discriminant="delete"/>
    </af:dropTarget>
    </af:image>
    This is the failing listener listener (the failing point is bold):
    public DnDAction dropHandler(DropEvent dropEvent) {
    DnDAction dnda = DnDAction.NONE;
    if (dropEvent.getProposedAction() == DnDAction.MOVE) { // delete
    RichTable table = (RichTable)dropEvent.getDragComponent();
    //determine the rows that are dragged over
    Transferable t = dropEvent.getTransferable();
    //when looking for data, use the same discriminator as defined
    //on the drag source
    DataFlavor<RowKeySet> df =
    DataFlavor.getDataFlavor(RowKeySet.class, "delete");
    RowKeySet rks = t.getData(df);
    if (rks == null) {
    return DnDAction.NONE;
    Iterator iter = rks.iterator();
    while (iter.hasNext()) {
    //get next selected row key
    System.out.println(rks.toArray().length); // the number of selected rows is ok
    List key = (List)iter.next(); // here gives: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
    //make row current so we can access it
    table.setRowKey(key);
    //the table model represents its row by the ADF binding class,
    //which is JUCtrlHierNodeBinding
    JUCtrlHierNodeBinding rowBinding =
    (JUCtrlHierNodeBinding)table.getRowData();
    Row row = (Row)rowBinding.getRow();
    //delete row;
    row.remove();
    //activate animation
    dnda = DnDAction.MOVE;
    return dnda;
    thanks.

    I did try, I obtained this:
    java.lang.NullPointerException
    Why NullPointerException?
    I don't know if this helps, but consider that the collection model comes from a ViewObject built on three EOs with many fields, although the table only shows one column.
    This is the Iterator in my pageDef:
    <table IterBinding="MyView1Iterator" id="MyView1">
    <AttrNames>
    <Item Value="Cod1"/>
    <Item Value="Cod2"/>
    <Item Value="Cod3"/>
    <Item Value="Cod4"/>
    <Item Value="Description"/>
    <Item Value="Cod5"/>
    </AttrNames>
    </table>
    Any idea?
    I will see the Key content with the debugger.

  • Select All in a table does not work for Drag and Drop

    Hi. I am using Jdeveloper 11.1.1.2 but have also reproduced in 11.1.1.3.
    I am trying to implement drag and drop rows from one table to another. Everything works fine except when I do a Select All (ctrl-A) in a table, the table visually looks like all rows are selected, but when I try to click on one of the selected rows to drag to the other table, only the row I click on is dragged.
    I tried setting Range Size -1, fetch mode to FETCH_ALL, content delivery to "immediate" but nothing works.
    I even have reproduced not using a view object but just a List of beans with only 5 or 10 beans showing in the table.
    Does anyone know how to get Select All to work for a Drag Source?
    Thanks.
    -Ed

    Frank-
    OK, thanks for looking into that. I also submitted this service request, which includes a simple sample app to demonstrate the problem:
    SR #3-2387481211: ADF Drag and Drop does not work for rows in table using Select All
    Thanks again for the reply.
    -Ed

  • What is the correct way to add styling to drag-and-drop created calendars?

    I have a working instance of a rich client calendar. I generated the view with the required fields (start, stop, provider, ...), put it into the App Module, and dragged it onto a JSF page to create a calendar.
    Next I created an activityScope object in a class called CalendarBean (no inheritance)
    Class CalendarBean()
    private HashMap<Set<String>, InstanceStyles> activityColorMap;
    +..+
    +public CalendarBean() {+
    super();
    activityColorMap = new HashMap<Set<String>, InstanceStyles>();
    HashSet setEd = new HashSet<String>();
    HashSet setLen = new HashSet<String>();
    setEd.add("Work");
    setLen.add("Home");
    activityColorMap.put(setEd, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityColorMap.put(setLen, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.RED));
    +}+
    +}+
    Next, I linked this up as a backing bean and associated the ActivityStyles of CalendarBean to it:
    +#{backingBeanScope.calendarBean.activityColorMap}+
    I populated some records in the database with properties "Work" and "Ed', but they show default blue.
    As I understand it, I need to do something with the getTags() method of the underlying CalendarActivity class, but I'm not quite sure how to do that.
    Took a stab at creating a class, CalendarActivityBean, that extended CalendarActivity, and pointed all the CalendarActivity references I had to the new class, but it didn't seem to fire (in debug), and I got into trouble, when inserting records, with
    public void calendarActivityListener(CalendarActivityEvent calendarActivityEvent) {
    currActivity = (CalendarActivityBean) calendarActivityEvent.getCalendarActivity();
    being an illegal cast
    What is the correct way to add provider-based styling to drag-and-drop create calendars?
    Ed Schechter

    A colleague of mine was kind enough to solve this:
    The calendar has ActivityStyles property = #{calendarBean.activityStyles}
    CalendarBean looks something like this:
    package com.hub.appointmentscheduler.ui.schedule;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Set;
    import oracle.adf.view.rich.util.CalendarActivityRamp;
    import oracle.adf.view.rich.util.InstanceStyles;
    +public class CalendarBean {+
    private HashMap activityStyles;
    private String dummy;
    +public CalendarBean() {+
    +// Define colors+
    activityStyles = new HashMap<Set<String>, InstanceStyles>();
    HashSet setPending = new HashSet<String>();
    HashSet setArrived = new HashSet<String>();
    HashSet setApproved = new HashSet<String>();
    HashSet setCompleted = new HashSet<String>();
    setApproved.add("APPROVED");
    setPending.add("PENDING");
    setArrived.add("ARRIVED");
    setCompleted.add("COMPLETED");
    activityStyles.put(setApproved, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.GREEN));
    activityStyles.put(setPending, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityStyles.put(setArrived, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.PLUM));
    activityStyles.put(setCompleted, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.LAVENDAR));
    +}+
    +public void setactivityStyles(HashMap activityStyles) {+
    this.activityStyles = activityStyles;
    +}+
    +public HashMap getactivityStyles() {+
    return activityStyles;
    +}+
    +}+
    Now, go into the Bindings tab on the calendar page, double click the calendar binding, and specify the column you've defined as the calendar's Provider in the Tags dropdown.
    Should show colors.

  • Gantt drag and drop

    Hi.
    I'm trying to implement drag and drop in a dvt:schedulingGantt ADF component. I've managed to get it sort of working. I can click on a 'taskbar' and drag it to another 'resource'.
    But how can I get a reference to the Task that is being dragged? I can only get the key to the resource I'm dragging from, not the specific task that I'm dragging..
    I'm doing this:
    RowKeySet rowKeySet = transferable.getData(rowKeySetFlavor);
    and get the key (rowid) out of the RowKeySet, but thats the key to the resource, not to the task.
    I really need to get a reference to the dragged task, does anyone know how to do that?

    User,
    A timely question.
    Have a read of Data Visualization Components Demo - question to Oracle people
    Oracle has just posted the source for those demos.
    John

  • Reordering of rows - issue with drag and drop of editable columns in table

    JDeveloper: 11.1.1.6.0
    ADF Faces - Drag and Drop for reordering of rows within the same af:table
    I have a requirement for reordering rows in a table using drag and drop. This table is loaded using a list and I am able to programmatically do the reordering of the rows based on the events of drag and drop by manipulating the list. Reordering of rows is working fine if all the columns are read only. For all the input text and input date columns the values are not getting reordered. Anyone has any idea on what the issue may be with reordering of the rows for editable columns/rows (af:inputText and af:inputDate) in af:table. Below is what Iam doing on drop event which is a collection drop target.
    public DnDAction dropCollection(DropEvent dropEvent) {
    try
    Object dropSite = dropEvent.getDropSite();
    Transferable transferable = dropEvent.getTransferable();
    DataFlavor<RowKeySet> rowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
    RowKeySet rowKeySet = transferable.getData(rowKeySetFlavor);
    RichTable table = (RichTable) dropEvent.getDragComponent();
    if (rowKeySet != null)
    CollectionModel dragModel = transferable.getData(CollectionModel.class);
    Object dragM = dragModel.getRowData(0);
    Object currKey = rowKeySet.iterator().next();
    dragModel.setRowKey(currKey);
    table.setRowKey(currKey);
    OrderData orderData = (OrderData)this.prodReportTableData.get(Integer.parseInt(currKey.toString()));
    this.prodReportTableData.remove(Integer.parseInt(currKey.toString()));
    this.prodReportTableData.add(Integer.parseInt(dropSite.toString()), orderData);
    OrderData orderDataAdded = this.prodReportTableData.get(Integer.parseInt(dropSite.toString()));
    JSFUtils.addPartialTarget(this.getProdReportTableBinding());
    catch(Exception e)
    e.printStackTrace();
    return DnDAction.MOVE;
    Code snippet from UI:
    <af:table value="#{pageFlowScope.prodReportBackingBean.prodReportTableData}"
    var="row" styleClass="AFStretchWidth" rowBandingInterval="0"
    rows="40" emptyText="No data to display." id="t1"
    partialTriggers=":::cb1" columnStretching="column:c3"
    binding="#{pageFlowScope.prodReportBackingBean.prodReportTableBinding}" summary="PROD TABLE">
    <af:dragSource actions="MOVE" defaultAction="MOVE"
    discriminant="rowmove"
    dragDropEndListener="#{pageFlowScope.prodReportBackingBean.afterDragAndDrop}"/>
    <af:collectionDropTarget dropListener="#{pageFlowScope.prodReportBackingBean.dropCollection}"
    actions="MOVE"
    modelName="rowmove"/>

    Hi,
    not sure its the reason but you have huge bummer in your configuration.
    <af:table value="#{pageFlowScope.prodReportBackingBean.prodReportTableData}"
    var="row" styleClass="AFStretchWidth" rowBandingInterval="0"
    rows="40" emptyText="No data to display." id="t1"
    partialTriggers=":::cb1" columnStretching="column:c3"
    *binding="#{pageFlowScope.prodReportBackingBean.prodReportTableBinding}"* summary="PROD TABLE">
    JSF component bindings should not be to beans in a scope larger than request to avoid stale component instances.
    Frank

  • Dynamic Table using drag and drop table columns

    Hi,
    I want to create an ADF table which allows me to insert new columns from the list of columns.
    List of columns will be shown in the tree. I would like to drag a tree node to the table, table should highlight where i can drop the node.
    Once, i drop it, table should get refreshed with new column at inserted location.
    Is it possible? How?
    Regards,
    Suresh

    Hi,
    I don't think that a drop indicator is possible to create because the drag and drop is no from within the table but from external. You could add the drop target to the table and then determine the column that this is dropped onto. Based on this you can e.g. device to drop it to the right or left
    Frank

Maybe you are looking for

  • Import Spreadsheet error

    I am attempting to import a spreadsheet using HTMLDB 1.6. I want it to create the table for me. The table name is NAME_TEMP. There are 65 columns and about 1050 rows in the .csv file. When I press "Next" on the "Table Properties" step, I receive the

  • Getting Timestamp from Multiple Devices

    I am using LV 8.0 with the Compact DAQ Chassis and NI 6221 (for the encoder input – because the C DAQ system currently does not have any modules for quadrature counter input). I have modules NI 9205 and 9237. I will be doing multiple measurements at

  • All line items not reflected in GR

    Hi Gurus I have an issue regarding the Goods Receipt When i do the GR with reference to PO i am not able to get all the line items from the PO. The PO is raised based on a schedule agreement. Can anyone suggest what could be the reasons Its an urgent

  • TS3276 After installing Lion in my iMac, some formatted emails contain in sections of the text rows of letter A contained in boxes.

    After installing Lion in my iMac, some formatted emails contain, in some sections of the text, rows of the letter A contained in boxes. See attachment.

  • PC user wanting to swap to Mac has some queries.

    Hi, As the title suggests I have a few queries about swapping from PC to Mac. Firstly I've been informed that you can't directly compare speeds, processors, RAM etc of a PC with a Mac as MAcs run quicker, but is there a way of knowing what an equival