How to get UIComponent of the selected node in af:tree with drag and drop

Hi
Are there examples showing how one could get a UIComponent using DropEvent to be used with a Popup showing as a custom "context menu" at the target node ?
Right now, with dropEvent.getDropComponent, we could only get the tree.
We like to get its selected node so that the popup shows at the node level, not at the tree level.
Thanks

Hi Frank
Thanks for responding.
We like to show on our custom "context menu" using PopupHints (not using facet name contextmenu) with 3 commandMenuItems.
Since component id is needed by PopupHints to place this custom "context menu", we tried
RichTree dropTree = (RichTree)dropEvent.getDropComponent();
alignId = dropTree.getClientId(context);
// alignId = pt1:pt_region1:1:pt1:pc1:navTree
getClientId returns us the tree id and hence the context menu is placed next to tree.
We like to place the context menu next to a target node of the tree when dragging and dropping.
But we couldn't figure out how to get that node id.
In your suggestion,
List dropRowKey = (List) dropEvent.getDropSite();
RichTree dropComponent = (RichTree) dropEvent.getDropComponent();
dropCompoent.setRowKey(dropRowKey);
how do we then get the id of this node then ? What's the method ?
Thanks Frank

Similar Messages

  • How can i get the address with drag and drop from address book into pages?

    I want to creat a letter withe the new pages. Normaly it was possible to put the adress from the adressbook with drag and drop into the letter. So it was possible to create one letter with many different adresses. But now I didn't find this function any more. How to do ist now?
    Withe best regards and I'm sorry for may bad english
    Klaus

    Sounds like you "upgraded" to Pages 5.
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • How do I import music using homeshare with iTunes 11...I can see the shared libraries but I can't drag and drop and there is no import button.  Thanks!

    How do I import music using homeshare with iTunes 11...I can see the shared libraries but I can't drag and drop and there is no import button.  Thanks!

    Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
    If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
    Then, drag the address panel up to wherever you want it.
    You may also want to add it to the New Message window in the same way.

  • How can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    how can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    Generally drop the components at parasys. The components allowed on the parsys is control via the design mode of the page.So restrict components at the design of the parsys. http://dev.day.com/docs/en/cq/current/wcm/working_with_cq_wcm/using_edit_designandpreviewm odes.html#Design%20Mode

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • I am getting a "Internal error occurred" message when I try to drag and drop common library items on to my canvas.

    Hi,
    I am getting a "Internal error occurred" message when I try to drag and drop common library items on to my canvas.
    I have noticed that there are a number of these error messages and tried one solution of renaming a couple of files, I tried this and no joy.
    Has any one go a solution for this before I purchase Fireworks please?
    Kind regards,
    Dave G

    I can no longer get Firework CS6 to run - The program loads but without any toolbars/properties etc.  It just has an 'AN INTERNAL ERROR OCCURRED' message that cannot be dismissed.  The only way to close the program is via Task Manager (this is on a Window 8 PC).  I have uninstalled the program, rebooted the PC and re-installed (several times) but it has not resolved the problem.
    Fireworks is part of my Creative Cloud subscription and when reporting this via the live chat I was given the telephone number for Seagate Drives ??
    Anybody got a solution?
    Or, does anybody know how to open native Fireworks CS6 png files in Photoshop *but* with all the Fireworks layers preserved.
    Think I'll also post this as a new topic as the problem is slightly different to SirBasher's issue.

  • How we know the selected node in a Tree object in a form?

    In a TREE object in forms, how can we know the current selected node by clicking a push button.
    lets say , there are 10 nodes in my tree, and 5th one i selected. But i want to store the selected node in a variable, when i click a button.
    please help
    thanks

    Hello
    I've just notice what might be a bug in Oracle forms because when I have the when-tree-node-selected trigger present for the tree (It does not matter if it executes null or some code), the code in option 1 works fine on a when-button-pressed trigger on a button item. This is what I had done to give you a reply.
    My second option will work because you're populating a parameter with when-tree-node-selected trigger which is then readable form anywhere else in the form. All you add is a check on when-button-pressed. Also for bug handling you need to consider setting the value to null when deselecting. I have this option working currently in one of my applications.
    DECLARE
         num_selected NUMBER;
         htree ITEM;
    curren_node FTREE.NODE;
    BEGIN
    htree := find_item('tree.form_list');
    num_selected := ftree.get_tree_property(htree,ftree.selection_count);
    for j in 1..num_selected
    LOOP
    curren_node := ftree.get_tree_selection(htree,j);
    message('hello :'||ftree.Get_Tree_Node_Property(htree,curren_node,ftree.node_value),acknowledge);
    end loop;
    END;     
    cheers
    Q

  • After sorting photos into albums, the albums disappeared on me. I dragged and dropped the photos and went back to check that they were in place before exiting the program. When I went back, the folder was there but no albums. Help!

    Working on an IMac - with IPhoto v.9.6 
    This is my first experience with IPhoto... trying to move files from a PC over to a Mac.
    I don't have a ton of photos but I created about 6 albums - standard albums - and dragged and dropped individual photos into each of the albums. I named each of the albums as well so I would know what was in each. After i was finished, I created a folder called 2014 and moved each of the albums into that folder. Before moving ANY of the albums, I opened each of them up to make sure that all the photos I wanted in each were indeed there - and since there were some errors on my part, I deleted any duplicates first. SO, I KNOW the photos were actually in each of the albums BEFORE i moved them into the 2014 folder.
    My intention was to then delete the photo files in my document file but once I got there I thought I would go back and double check the IPhoto file just to make sure... and the pictures were NOT in the albums where I had placed them... is there a need to save this before you move on and if so, to where and how? I was under the impression that once files were moved to albums, they remain there.
    The photos are still in the photo library but unsorted now again... I cannot even open the 2014 folder at this point.
    Thanks for any help!!

    Was back on IPhoto this morning. The folder did not open at all so I deleted it. Beside Albums, nothing showed at all. It was like I had done no work at all except to import my photo folder. Nothing was in my trash bin either.
    I started again and created one album at a time. I dragged and dropped photos into the album and exited out of IPhoto, opened up other programs and then returned to IPhoto to see if the album was still there and it was this time. I created a second album and did the same thing. This time, for some reason, the albums seem to be staying in place. I am not doing anything differently than last time. After creating three albums, I created a folder called 2014 and dragged and dropped the three albums into the folder and exited IPhoto. They were still there when I returned - YEAH! It seems to be working - for now! I am keeping my fingers crossed that my photos are not going to disappear but I am not going to delete my photo folder from my files just in case!
    Thanks for the suggestions but this may just have been a funny glitch... not sure what happened. I didn't change anything or do anything differently this time except that I am doing it one album at a time and exiting the program between creating each of them and coming back to check... very strange.

  • How do I transfer files/folders to an external hard drive without "dragging and dropping"?

    Hi, I'm having a lot of trouble trying to transfer folders of pictures and individual pictures to my external hard drive (which God forbid isn't an Apple product). I attempted to drag and drop, which usually works. I have also attempted to find an option in any drop down menu which will allow me to import/transfer/etc. the photos from my Macbook to the external hard drive. This is maddening because the hard drive was immediately compatible and I can see everything that's on it already, I just can't really do anything with the content going either way. Is it because I need to compress things? Something like that? Any help or insight would be greatly appreciated.
    Thanks,
    William

    William G 42 wrote:
    , I just can't really do anything with the content going either way.
    Make sure the EHD is Formatted Mac OS Extended (journaled
    Format, Erase, or Reformat a drive
    In iPhoto, Select All the Photos you want to move... Then Goto... > File > Export >
    Choose the settings as seen here
    Click Export and select your External Drive
    Best to create a Folder to put them in... and away you go...
    More Help available from iPhoto Toolbar Help Menu

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

  • How I create a label with drag and drop?

    I have the next...
    I want to be able to move to a label (drag and drop) of swing in my panel contained in jframe.
    I already identify the position of the mouse with the method mouseMoved
    With the method ---jButton1ActionPerformed--- that I assign to each button I identify the selected component
    With the property setBounds of the button I assign the new hubicaci�n of the button.
    My questions:
    This good which I am doing?
    Like sending in value X and the value to him and of the position of the mouse to the button?
    Help me, please
    NOTE: in the example comence using JButton, but must be labels.
    import java.awt.dnd.DropTarget;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JButton;
    * @author Administrador
    public class MYCLass extends javax.swing.JFrame implements MouseMotionListener {
    private int coorX, coorY;
    private JButton general = null;
    /** Creates a new instance of MYCLass */
    public MYCLass() {
    System.out.println("Layout " + this.getContentPane().getLayout());
    this.getContentPane().setLayout(null);
    addMouseMotionListener(this);
    JButton jb = new JButton("1.- El botonsito");
    JButton jb2 = new JButton("2.- El botonsito");
    jb.setBounds(16,100,100,25);
    jb2.setBounds(16,280,100,25);
    jb.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jb2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    this.getContentPane().add(jb);
    this.getContentPane().add(jb2);
    this.pack();
    this.setSize(300, 600);
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    if (this.isFocusable()) {
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    // general = (JButton) ((javax.swing.JPanel) this.getContentPane().getC).getComponentAt(coorX,coorY);
    System.out.println(" boton genral tiene valor: " + general );
    // this.setBounds(coorX,coorY,100,25);
    System.out.println("Obtuvo el foco.... " + evt.getActionCommand());
    // this.getComponentAt();
    // System.out.println("Obtuvo el nombre... " + this.getName());
    public void mouseDragged(MouseEvent e) {
    repaint( );
    public void mouseMoved(MouseEvent e) {
    if(e.getClickCount() == 2) {
    System.out.println("Se presiono 2 veces el MOUSE");
    coorX = e.getX();
    coorY = e.getY();
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MYCLass().setVisible(true);
    }

    Hello!!!!
    I have the next......
    It modifies it and I am of the following form
    Give its opinion me, thanks!!!!
    import java.awt.dnd.DropTarget;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    * @author Administrador
    public class MYCLass extends javax.swing.JFrame implements MouseMotionListener {
    private int coorX, coorY;
    private JLabel labelPrincipal = null;
    /** Creates a new instance of MYCLass */
    public MYCLass() {
    System.out.println("Layout " + this.getContentPane().getLayout());
    this.getContentPane().setLayout(null);
    addMouseMotionListener(this);
    JLabel jl1 = new JLabel("1.- Etiqueta... ");
    JLabel jl2 = new JLabel("2.- Etiqueta... ");
    jl1.setBounds(16,100,100,25);
    jl2.setBounds(16,280,100,25);
    jl1.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    System.out.println("Click");
    System.out.println("Source... " + e.getSource());
    labelPrincipal = (JLabel) e.getSource();
    labelPrincipal.setText("Texto especial .....");
    jl2.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    System.out.println("Click");
    System.out.println("Source... " + e.getSource());
    labelPrincipal = (JLabel) e.getSource();
    labelPrincipal.setText("Cambia tu texto.....");
    this.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    formMouseClicked(evt);
    this.getContentPane().add(jl1);
    this.getContentPane().add(jl2);
    this.pack();
    this.setSize(300, 600);
    private void formMouseClicked(java.awt.event.MouseEvent evt) {
    if (evt.getClickCount() == 2) {
    // labelPrincipal.setBounds(coorX,coorY,120,25);
    System.out.println( "PRESIONO EL MOUSE.. " + evt.getClickCount());
    labelPrincipal = null;
    public void mouseDragged(MouseEvent e) {
    public void mouseMoved(MouseEvent e) {
    if (labelPrincipal != null) {
    coorX = e.getX();
    coorY = e.getY();
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    labelPrincipal.setBounds(coorX-1,coorY-35,120,25);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MYCLass().setVisible(true);
    }

  • How to get UID of the selected PageItem

    Hi All,
    I have placed a image in a document . I select the image ,now i need the UID for the selected pagitem( i,e image).How to get it?
    Thanks
    Sakthi

    Hi,
    I think you have to check Selection Architecture.
    Thanks

  • How to get UIDRef of the selected page item in indesign cs3

    Hi,
        I want to get the UIDRef of the selected page item like Rectangle Frame. Can you show me the complete code snippet to get the UIDRef of selected Rectangle Frame. I need this UIDRef for getting the geometric bounds properties(width and height) of the selected rectangle frame to display the user in dialog box.
    Regards,
    K.Saravanan.

    Hi,
    UIDList selection;
    InterfacePtr<ISelectionManager> pSelectionManager(Utils<ISelectionUtils>()->GetActiveSelection(), ISelectionManager::kDefaultIID);
    if(pSelectionManager == nil){
    break;
    InterfacePtr<ILayoutTarget> pLayoutTarget(pSelectionManager->QueryConcreteSelectionBoss(kNewLayoutSelectionBoss), ILayoutTarget::kDefaultIID);
    if(pLayoutTarget == nil){
    break;
    selection = pLayoutTarget->GetUIDList(kDontStripStandoffs);
    Then, you can use this interface "IGeometry" to get information about spline size.
    InterfacePtr<IGeometry> pGeometry(selection.GetRef(i), IGeometry::kDefaultIID);
    if(pGeometry== nil){
    break;
    PMRect splineBounds = pGeometry->GetStrokeBoundingBox();
    PMReal width = splineBounds.Height();
    PMReal hight = splineBounds.Width();
    Regards,

  • How to get row of the selected cell  in ALV  while implementing OVS

    Dear Folks,
                    I am implementing OVS search help in ALV.When i click on cell, i can see the search help in  cell and now i can identify the colomn of the cell but i can't identify the row of the cell.Can any one tell me how to identify row of the cell in this case.
    Nirad.

    Thnx for the answer nithya.I have solved problem my self.
    DATA: elem_ovs TYPE REF TO if_wd_context_element,
            ls_data TYPE REF TO data,
            ls_index type string.
      FIELD-SYMBOLS : <ovs_data> TYPE data.
      elem_ovs = ovs_callback_object->context_element.
      ls_data = elem_ovs->get_static_attributes_ref( ).
      ls_index = elem_ovs->GET_INDEX( ).
    and this is the solution.

  • How to get access to the local file system when running with Web Start

    I'm trying to create a JavaFX app that reads and writes image files to the local file system. Unfortunately, when I run it using the JNLP file that NetBeans generates, I get access permission errors when I try to create an Image object from a .png file.
    Is there any way to make this work in Netbeans? I assume I need to sign the jar or something? I tried turning "Enable Web Start" on in the application settings, and "self-sign by generated key", but that made it so the app wouldn't launch at all using the JNLP file.

    Same as usual as with any other web start app : sign the app or modify the policies of the local JRE. Better sign the app with a temp certificate.
    As for the 2nd error (signed app does not launch), I have no idea as I haven't tried using JWS with FX 2.0 yet. Try to activate console and loggin in Java's control panel options (in W7, JWS logs are in c:\users\<userid>\appdata\LocalLow\Sun\Java\Deployment\log) and see if anything appear here.
    Anyway JWS errors are notoriously not easy to figure out and the whole technology in itself is temperamental. Find the tool named JaNeLA on the web it will help you analyze syntax error in your JNLP (though it is not aware of the new syntax introduced for FX 2.0 and may produce lots of errors on those) and head to the JWS forum (Java Web Start & JNLP Andrew Thompson who dwells over there is the author of JaNeLA).

Maybe you are looking for