Drag & Drop ViewObject as Table Exception
Hi,
When I drag & drop any view object onto the page, there are no problems when dropping it as a Form. When I drag & drop the same view object onto the page as a Table, however, a stack trace appears from JDeveloper. I have posted screen shots showing the differences:
Drop as Form (okay): http://i.imgur.com/nMgcb.png
Drop as Table (error): http://i.imgur.com/25836.png
This problem only happens with one specific application. All the other applications can drag & drop without problem.
Suggestions for where to look to resolve the problem would be fantastic. Here is the stack trace:
16-Mar-2010 9:57:34 AM oracle.adf.dt.managers.ApplicationManager findOrCreateDataControlInApplication
FINER: THROW
java.lang.ClassCastException: oracle.xml.parser.v2.XMLComment
at oracle.adf.dt.objects.JUDTApplication$3.run(JUDTApplication.java:590)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.objects.JUDTApplication.findDataControl(JUDTApplication.java:601)
at oracle.adf.dt.managers.ApplicationManager.findOrCreateDataControlInApplication(ApplicationManager.java:518)
at oracle.adf.dt.managers.IteratorManager.initializeIteratorBindingProperties(IteratorManager.java:419)
at oracle.adf.dt.managers.IteratorManager.createIteratorInstance(IteratorManager.java:401)
at oracle.adf.dt.managers.IteratorManager.findOrCreateIterator(IteratorManager.java:245)
at oracle.adf.dt.dbpanel.DataBindingManager$2.run(DataBindingManager.java:965)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.findOrCreateIteratorBinding(DataBindingManager.java:986)
at oracle.adf.dt.dbpanel.DataBindingManager$1.run(DataBindingManager.java:1033)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:1111)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:996)
at oracle.adfdt.view.common.binding.utils.ADFBindingUtils.createControlBinding(ADFBindingUtils.java:99)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getTableBinding(ADFIteratorModelProvider.java:338)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getIteratorBindingExpression(ADFIteratorModelProvider.java:83)
at oracle.adfdtinternal.view.faces.binding.binder.ADFCustomTableBinder.bind(ADFCustomTableBinder.java:78)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo._bindDocumentFragment(XmlBasedCreatorInfo.java:483)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo.createDocumentFragment(XmlBasedCreatorInfo.java:257)
at oracle.adfdtinternal.view.common.binding.datatransfer.ADFDocumentFragmentCreatorInfo.createDocumentFragment(ADFDocumentFragmentCreatorInfo.java:76)
at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:96)
at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:39)
at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLComment
at oracle.adf.dt.objects.JUDTApplication$3.run(JUDTApplication.java:590)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.objects.JUDTApplication.findDataControl(JUDTApplication.java:601)
at oracle.adf.dt.managers.ApplicationManager.findOrCreateDataControlInApplication(ApplicationManager.java:518)
at oracle.adf.dt.managers.IteratorManager.initializeIteratorBindingProperties(IteratorManager.java:419)
at oracle.adf.dt.managers.IteratorManager.createIteratorInstance(IteratorManager.java:401)
at oracle.adf.dt.managers.IteratorManager.findOrCreateIterator(IteratorManager.java:245)
at oracle.adf.dt.dbpanel.DataBindingManager$2.run(DataBindingManager.java:965)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.findOrCreateIteratorBinding(DataBindingManager.java:986)
at oracle.adf.dt.dbpanel.DataBindingManager$1.run(DataBindingManager.java:1033)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:1111)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:996)
at oracle.adfdt.view.common.binding.utils.ADFBindingUtils.createControlBinding(ADFBindingUtils.java:99)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getTableBinding(ADFIteratorModelProvider.java:338)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getIteratorBindingExpression(ADFIteratorModelProvider.java:83)
at oracle.adfdtinternal.view.faces.binding.binder.ADFCustomTableBinder.bind(ADFCustomTableBinder.java:78)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo._bindDocumentFragment(XmlBasedCreatorInfo.java:483)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo.createDocumentFragment(XmlBasedCreatorInfo.java:257)
at oracle.adfdtinternal.view.common.binding.datatransfer.ADFDocumentFragmentCreatorInfo.createDocumentFragment(ADFDocumentFragmentCreatorInfo.java:76)
at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:96)
at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:39)
at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
16-Mar-2010 9:57:34 AM oracle.adf.dt.managers.IteratorManager createIteratorInstance
FINER: THROW
java.lang.NullPointerException
at oracle.adf.dt.managers.IteratorManager.initializeIteratorBindingProperties(IteratorManager.java:422)
at oracle.adf.dt.managers.IteratorManager.createIteratorInstance(IteratorManager.java:401)
at oracle.adf.dt.managers.IteratorManager.findOrCreateIterator(IteratorManager.java:245)
at oracle.adf.dt.dbpanel.DataBindingManager$2.run(DataBindingManager.java:965)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.findOrCreateIteratorBinding(DataBindingManager.java:986)
at oracle.adf.dt.dbpanel.DataBindingManager$1.run(DataBindingManager.java:1033)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:1111)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:996)
at oracle.adfdt.view.common.binding.utils.ADFBindingUtils.createControlBinding(ADFBindingUtils.java:99)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getTableBinding(ADFIteratorModelProvider.java:338)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getIteratorBindingExpression(ADFIteratorModelProvider.java:83)
at oracle.adfdtinternal.view.faces.binding.binder.ADFCustomTableBinder.bind(ADFCustomTableBinder.java:78)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo._bindDocumentFragment(XmlBasedCreatorInfo.java:483)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo.createDocumentFragment(XmlBasedCreatorInfo.java:257)
at oracle.adfdtinternal.view.common.binding.datatransfer.ADFDocumentFragmentCreatorInfo.createDocumentFragment(ADFDocumentFragmentCreatorInfo.java:76)
at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:96)
at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:39)
at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.NullPointerException
at oracle.adf.dt.managers.IteratorManager.initializeIteratorBindingProperties(IteratorManager.java:422)
at oracle.adf.dt.managers.IteratorManager.createIteratorInstance(IteratorManager.java:401)
at oracle.adf.dt.managers.IteratorManager.findOrCreateIterator(IteratorManager.java:245)
at oracle.adf.dt.dbpanel.DataBindingManager$2.run(DataBindingManager.java:965)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.findOrCreateIteratorBinding(DataBindingManager.java:986)
at oracle.adf.dt.dbpanel.DataBindingManager$1.run(DataBindingManager.java:1033)
at oracle.adfdt.jdev.transaction.JDevTransactionManager$3.performTask(JDevTransactionManager.java:116)
at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:98)
at oracle.adfdt.jdev.transaction.JDevTransactionManager.fetchUnderTransaction(JDevTransactionManager.java:110)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:1111)
at oracle.adf.dt.dbpanel.DataBindingManager.createControlBinding(DataBindingManager.java:996)
at oracle.adfdt.view.common.binding.utils.ADFBindingUtils.createControlBinding(ADFBindingUtils.java:99)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getTableBinding(ADFIteratorModelProvider.java:338)
at oracle.adfdtinternal.view.faces.binding.provider.ADFIteratorModelProvider.getIteratorBindingExpression(ADFIteratorModelProvider.java:83)
at oracle.adfdtinternal.view.faces.binding.binder.ADFCustomTableBinder.bind(ADFCustomTableBinder.java:78)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo._bindDocumentFragment(XmlBasedCreatorInfo.java:483)
at oracle.adfdtinternal.view.common.binding.creator.XmlBasedCreatorInfo.createDocumentFragment(XmlBasedCreatorInfo.java:257)
at oracle.adfdtinternal.view.common.binding.datatransfer.ADFDocumentFragmentCreatorInfo.createDocumentFragment(ADFDocumentFragmentCreatorInfo.java:76)
at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:96)
at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:39)
at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Edited by: Dolphin on Mar 16, 2010 10:11 AM
There was an XML comment inside the data bindings file (DataBindings.cpx).
Similar Messages
-
Drag & Drop, ALV or Table Control to Tree Control
Hi Experts,
If i want Drag & Drop feature in ALV or Table Control to Tree ControlHi,
refer to the link below:
http://help.sap.com/saphelp_46c/helpdata/fr/22/a3f5fbd2fe11d2b467006094192fe3/content.htm
With luck,
Pritam. -
Drag & drop from sorted table view to outline view in AppleScript Studio
I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
Problem is that the data are copied from the data source of the table view,
wich is unsorted, rather than from the table view itself that is sorted.
So I have the wrong data droped.
The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
Any help welcome.I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
Problem is that the data are copied from the data source of the table view,
wich is unsorted, rather than from the table view itself that is sorted.
So I have the wrong data droped.
The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
Any help welcome. -
NamedViewCriteria not working when drag and dropped as filtered table.
Using JDev 11.1.2.1.0.
I'm attempting to use NamedViewCriteria more and more because, well ... I keep reading it's the way to go. But I'm encountering an aggravating problem. I can't get them to work when I drag and drop as a filtered table onto a page. They work when I apply them in a managed bean, but simply dragging and dropping will not trigger the NamedViewCriteria to display the filtered items correctly.
Creating a where clause manually works fine.
Manual Where Clause & drag and drop ViewObject from data control
(:pBpKey is null or upper(BP_KEY) like '%' || upper(:pBpKey) || '%') AND CinderBusinessPartners.BP_TYPE = 'C'NamedViewCriteria & drag and drop from ViewObject's NamedViewCriteria from data control
( ( (CinderBusinessPartners.BP_KEY LIKE ('%' || :pBpKey || '%') ) AND (CinderBusinessPartners.BP_TYPE = 'C' ) ) )There are three problems:
1) The query pulls back all items. It doesn't retrieve only where BP_TYPE = 'C'.
2) It is case sensitive. i.e. Enter in A will not pull back the customer Wal-Mart because Wal-mart contains lowercase a's.
3) If I set the table's "Show Filter" attribute to true, the filter has the text "\*pBpKey\*" filled in by default. uhhh What?
In the NamedViewCriteria's "UI Hints" tab, I have the "Query Automatically" checkbox selected.
Any ideas why the NamedViewCriteria isn't "just working"?
I'll be back with pictures after the break.
WillI've rolled this into a bug post as seen here: BUG: NamedViewCriteria drag and drop as table SNAFU
Pictures:
Here is the NVC query
http://www.williverstravels.com/JDev/Forums/Threads/2381120/Nvc1.jpg
Here's that dang extra bind variable!
http://www.williverstravels.com/JDev/Forums/Threads/2381120/Nvc3.jpg
And just because I like awesome Paint.Net art.
http://www.williverstravels.com/JDev/Forums/Threads/2381120/Nvc2.jpg
Hope this helps someone down the road.
Edited by: LovettWB on Apr 26, 2012 1:59 PM -
New JNDI name created for each drag and drop of database table into table
Hi All,
I'm using Netbeans 5.5 with Visual Web Pack with Mysql as backend. Whenever I drag and drop a database table into table component it creates new JNDI (data source) name for each table. I want to use single JNDI name for all tables. If I change the JNDI name to default name then the design disappears and shows error . Is there any option to set the JNDI name unique for all tables?
Thanks in advance.Hi again,
Well I've tried using the MouseListener / MouseMotionListener approach but it doesn't quite seem to work, although it does get the events correctly. I think the reason is that it doesn't interact correctly with the Java DnD machinery which is something that V.V hinted at. It's something that I may need to look into if / when I have more time available.
I have to say though that I haven't had any problems with scrollbars - we're making fairly heavy use of large tables and if you drag over a table with a scroll bar and move to the top or bottom then it scrolls as you would expect and allows you to drop the data where you like. For this situation I've used pretty much the same approach as for the toy example above except that I've implemented separate source and destination TransferHandlers (the source table is read-only, and it really doesn't make sense to allow people to drag from the destination table so I've essentially split the functionality of the example handler down the middle).
I'm not actually particularly in favour of messing too much with the mechanics of DnD, more because of lack of time than anything else. Guess I'll just have to put up with this for the moment. Doesn't help that DnD is so poorly documented by Sun.
Thanks for all your help.
Bart -
Problem with Drag & Drop and multiselection in tables
Hi,
we have a problem concerning drag and drop and multiselection in tables. It is not possible to drag a multiselection of table rows, as the selection event is recognized or handled before the drag event. So before the drag starts, the selection will be changed and only a single row is selected at the position where you started the drag with a mouse click.
There was also a java bug with the id 4521075 regarding this problem a couple of years ago. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4521075.
This bug has been resolved but in our application we have not enabled drag by setting setDragEnabled(true) on the table as we have an own implementation of a DragSource (which is the table component), and a DragGestureRecognizer to control mimetype and data to be dragged.
So my question is: Is there any solution for this case without calling setDragEnabled(true) on the table? Or is it possible to enable drag on the table and override some method where the drag recognition happens and the transferable object is created?
Thanks,Thanks for reply,
Steps to reproduce the problem:
1) user clicks the ascending sorting icon in the table(the button get disabled after sorting the table).
2) After sorting user drag and drop some row over another row.
3) Now the table is no longer sorted.
4) If user again wants to sort the table now, he cannot do it because the sorting button is still disabled.
So I want the user to sort the table again, without refreshing the page
Thanks and Regards,
Tarun -
I need to implement Drag N Drop between two tables which saves both records
I need to implement Drag N Drop between two tables which saves both records in a third page, by using drag n drop.
check this video http://baigsorcl.blogspot.com/2011/01/drag-and-drop-collection-in-oracle-adf.html
-
SqlDev 3.0 - Query Builder - Drag/Drop table - SLOW
Has anyone else had their sql*dev 3.0 session essentially "freeze" when attempting to drag/drop a table into the query builder tab?
After the table finally show up in the query builder, if I remove the table and then drop it back in again, it appears in the QB immediately. The slowness only seems to happen the first time you drag each individual table in.
Anyone seen it?, is there a solution?
Thanks!It's expected behavior, since the Query Builder needs to load all the required table meta data and the related constraints, foreign keys etc.
The first EA version of this actually tried to load everything on startup, but then the tool became unusable during the startup phase of Query Builder.
If you are interested in the debate you can read it in the following threads:
Re: Poor performance on Query Builder with 3EA2
3.0.02.37 EA1: Query Builder Performance With Large Schema? -
Hierarchy Viewer and Drag Drop
Hi I am new for ADF Hiearchy Viewe components. I am trying drag from ADF table rows to drop ADf Hierarchy viewer node and introduce by http://docs.oracle.com/cd/E28280_01/web.1111/b31973/dv_hviewer.htm here.
1. can get selected rows from drag source ADF rich table and I couldn't get Drop Row Key. In my source some hierarchy node work and some are not work. sourc here.
<pre>
public DnDAction toDropListener(DropEvent event)
RichTable table = (RichTable) event.getDragComponent();
Transferable t = event.getTransferable();
DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
RowKeySet rks = t.getData(df);
Iterator iter = rks.iterator();
List<Row> sourceRow = new ArrayList<Row>();
while (iter.hasNext())
List key = (List) iter.next();
table.setRowKey(key);
JUCtrlHierNodeBinding rowBinding = (JUCtrlHierNodeBinding) table.getRowData();
sourceRow.add((Row) rowBinding.getRow());
Transferable transferable = event.getTransferable();
DataFlavor<Object> dataFlavor = DataFlavor.getDataFlavor(Object.class);
Object transferableObj = transferable.getData(dataFlavor);
if (transferableObj == null)
return DnDAction.NONE;
UIComponent dropComponent = event.getDropComponent();
Object dropSite = event.getDropSite();
if (dropSite instanceof Map)
String clientRowKey = (String) ((Map) dropSite).get("clientRowKey");
Object rowKey = getRowKey(dropComponent, clientRowKey);
List<Key> keys = (List<Key>) rowKey;
System.out.println("Row Key: "+rowKey+ " Size of Keys: "+keys.size());
if (rowKey != null)
DCIteratorBinding itrEmp;
if(keys.size()==1)
itrEmp = ADFUtils.findIterator("ParentEmpTreeVO1Iterator");
}else
itrEmp = ADFUtils.findIterator("ChildEmpTreeVO1Iterator");
ViewObject hist=itrEmp.getViewObject();
Key key = keys.get(keys.size() - 1);
Row targetRow = hist.getRow(key);
System.out.println("Key: "+key);
System.out.println("Employee Id: " + targetRow.getAttribute("EmpId"));
if (sourceRow != null && !sourceRow.isEmpty())
for (Row row : sourceRow)
Row newRow=itrEmp.getRowSetIterator().createRow();//hist.createRow();
newRow.setAttribute("EmpId", row.getAttribute("EmployeeId"));
newRow.setAttribute("FirstName", row.getAttribute("FirstName"));
newRow.setAttribute("ManagerId", targetRow.getAttribute("EmpId"));
itrEmp.getRowSetIterator().insertRow(newRow);//hist.insertRow(newRow);
System.out.println("Created Row.");
else
RequestContext.getCurrentInstance().addPartialTarget(event.getDropComponent());
return event.getProposedAction();
private Object getRowKey(UIComponent component, String clientRowKey)
if (component instanceof UIHierarchyViewer)
UIHierarchyViewer hv = (UIHierarchyViewer) component;
ClientRowKeyManager crkm = hv.getClientRowKeyManager();
return crkm.getRowKey(FacesContext.getCurrentInstance(), component, clientRowKey);
return null;
</pre>
and in hierarchy viewer added row displayed on level one for session then reload page it is ok why shot in level 1
Where I missed? how to Selected rows assign to hierarchy viewer object? thanks juddithanks for your reply shay. i am just trying to understand how a dvt HV could render in iPhone mobile browser (eg. iOS simulator) as its a part of ADF Faces components. as a part of mobile development we have only trinidad components available (not HV) and it renders in iOS simulator.
I have tested a HV app (JDev 11.1.1.6) in Safari web browser and it works fine there. Please share your thoughts on this.
~Abhijit -
Faking Drag&Drop operation to external application
Hello,
a rather complicated issue. in my program i have a JTable, and i can drag&drop from this jtable
to external programs like windows explorer by clicking the mouse and moving it from the table
to the external program.
how can i reproduce this exact behaviour WITHOUT user intervention?
in other words, how can i do this programmatically, creating a drop source at the start point,
then move the mouse, and release it above a specified location on the screen?
is this even possible in java (as we're running in a VM) ?it has it's problems.
for example, if the drop point is above the source point, moving the mouse with the robot sometimes marks all entries in the table instead of performing a drag&drop operation. also, it seems that without a delay between the moves, strange things happen. so here is an updated version which workes 99% flawlessly for me.
package trakker;
import java.awt.Point;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.util.logging.Level;
* this thread fakes a drag & drop operation to the traktor decks
public class LoadDeckThread implements Runnable
Point source; // where was the mouse pointer before operation?
Point track; // where is the point of the track in the jlist?
Point target; // where do we move the track to?
// constructor
public LoadDeckThread(Point pTrack, Point pSource, Point pMoveTo)
track = pTrack;
source = pSource;
target = pMoveTo;
// thread run
public void run()
try
// create a new robot
Robot robot = new Robot();
robot.setAutoDelay(100);
// move the mouse to the track in the jlist
robot.mouseMove(track.x, track.y);
// click and hold
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.waitForIdle();
// move to the left to prevent list scrolling
robot.mouseMove(50, target.y);
// and to the topleft of our app
Point p = Util.mainWnd.getLocation();
robot.mouseMove(p.x, p.y);
// move the mouse to the specified deck
robot.mouseMove(target.x, target.y);
// wait some time (otherwise it doesn't work?)
//robot.delay(500);
robot.waitForIdle();
// release the mouse
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.waitForIdle();
// move back to the track
robot.mouseMove(track.x, track.y);
robot.waitForIdle();
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
// now move back where we were
robot.mouseMove(source.x, source.y);
robot.waitForIdle();
robot = null;
catch(Exception ex)
Util.log("Cannot invoke robot for drag&drop: " + ex.getMessage(), Level.SEVERE);
} instead of to close tags ;=) -
ALV Grid Drag & Drop - Cell-specific
Hi ABAPers,
I've referred SAP Standard program / SDN forum and got some logic for ALV Drag & Drop for row-specific, Column-specific and for Trees. But I didn't get for Cell-specific.
My requirement is :
If the user drags a particular cell to another cell in an ALV-grid, then that Cell value should be copied to the 'Dropped-Cell' in the ALV Grid and should be saved to that particular Internal Table.I have referred the SAP standard program BCALV_DND_03 which does from a different tree to a cell. My requirement is from the same ALV grid Table.
I've also referred BCALV_DND_04 which is useful. But here, it does it for the whole row.
Can anyone please help me in this?
Thanks a lot.
Best Regards,
SowmyaTOP INCLUDE:
DATA: BEGIN OF g_t_plan_alv_m OCCURS 0,
header,
count(5).
INCLUDE STRUCTURE g_ze6spw_plan_alv.
DATA: handle_style TYPE lvc_t_styl,
handle_dragdrop TYPE lvc_t_drdr,
tabcolor TYPE lvc_t_scol.
DATA: END OF g_t_plan_alv_m.
CLASS cl_gui_resources DEFINITION LOAD.
CLASS lcl_events_dragdrop DEFINITION DEFERRED.
DATA:
BEGIN OF g_ty_s_outtab OCCURS 0,
header,
count(5).
INCLUDE STRUCTURE g_ze6spw_plan_alv.
DATA: handle_style TYPE lvc_t_styl,
handle_dragdrop TYPE lvc_t_drdr,
tabcolor TYPE lvc_t_scol,
END OF g_ty_s_outtab.
DATA: g_field TYPE lvc_fname.
DATA:
gr_events TYPE REF TO lcl_events_dragdrop,
gr_dragdrop TYPE REF TO cl_dragdrop,
gr_dragdrop_background TYPE REF TO cl_dragdrop.
CLASS lcl_events_dragdrop DEFINITION.
PUBLIC SECTION.
DATA: m_grid TYPE i.
METHODS:
ondrag FOR EVENT ondrag
OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no
e_dragdropobj,
ondrop FOR EVENT ondrop
OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no
e_dragdropobj,
ondropcomplete FOR EVENT ondropcomplete
OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no
e_dragdropobj,
ondropgetflavor FOR EVENT ondropgetflavor
OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no
e_dragdropobj
e_flavors.
ENDCLASS. "LCL_DRAGDROP DEFINITION
* CLASS lcl_dragdrop_obj DEFINITION
CLASS lcl_dragdrop_obj DEFINITION.
PUBLIC SECTION.
DATA: line LIKE g_ty_s_outtab,
index TYPE i.
ENDCLASS. "lcl_dragdrop_obj DEFINITION
CLASS lcl_events_dragdrop IMPLEMENTATION.
METHOD ondrag.
PERFORM event_ondrag USING e_row
e_column
e_dragdropobj.
ENDMETHOD. "ondrag
METHOD ondrop.
PERFORM event_ondrop USING e_row
e_column
e_dragdropobj.
ENDMETHOD. "ondrop
METHOD ondropcomplete.
PERFORM event_ondropcomplete USING e_row
e_column
e_dragdropobj.
ENDMETHOD. "ondropcomplete
METHOD ondropgetflavor.
PERFORM event_ondropgetflavor USING e_row
e_column
es_row_no
e_dragdropobj
e_flavors.
ENDMETHOD. "ondropgetflavor
ENDCLASS. "LCL_objdragdropapp IMPLEMENTATION
FORM set_drag_drop.
DATA: l_effect TYPE i,
l_dragdrop_handle TYPE i,
ls_dragdrop TYPE lvc_s_dd01,
ls_drag_cell TYPE lvc_s_drdr,
lt_drag_cells TYPE lvc_t_drdr,
ls_fcat TYPE lvc_s_fcat,
l_field TYPE lvc_fname,
l_source TYPE char1,
l_target TYPE char1,
l_alv_exclude_tab TYPE ui_functions,
l_variant TYPE disvariant.
FIELD-SYMBOLS: <fs_brcp> TYPE zreceipt,
<fs_bisu> TYPE z_supply.
CREATE OBJECT gr_dragdrop.
CREATE OBJECT gr_dragdrop_background.
CREATE OBJECT gr_events.
SET HANDLER gr_events->ondrag
FOR g_plan_alv.
SET HANDLER gr_events->ondrop
FOR g_plan_alv.
SET HANDLER gr_events->ondropcomplete
FOR g_plan_alv.
SET HANDLER gr_events->ondropgetflavor
FOR g_plan_alv.
LOOP AT g_t_plan_alv_m.
MOVE-CORRESPONDING g_t_plan_alv_m TO g_ty_s_outtab.
APPEND g_ty_s_outtab.
ENDLOOP.
l_effect = cl_dragdrop=>move + cl_dragdrop=>copy.
CALL METHOD gr_dragdrop->add
EXPORTING
flavor = 'Line' "#EC NOTEXT
dragsrc = c_on
droptarget = c_on
effect = l_effect.
CALL METHOD gr_dragdrop->get_handle
IMPORTING
handle = l_dragdrop_handle.
ls_dragdrop-cntr_ddid = l_dragdrop_handle. "auch bei leerem Grid
ls_dragdrop-grid_ddid = space.
ls_dragdrop-col_ddid = space.
ls_dragdrop-row_ddid = space.
ls_dragdrop-fieldname = 'HANDLE_DRAGDROP'.
g_plan_layo-s_dragdrop = ls_dragdrop.
LOOP AT g_t_mat_index.
*Bulk Issues
CONCATENATE c_plan_alvm c_bisu g_t_mat_index-index INTO l_field.
ASSIGN (l_field) TO <fs_bisu>.
CLEAR l_field.
*Bulk Receipts
CONCATENATE c_plan_alvm c_brcp g_t_mat_index-index INTO l_field.
ASSIGN (l_field) TO <fs_brcp>.
CLEAR l_field.
ls_drag_cell-fieldname = <fs_brcp>."l_field.
ls_drag_cell-dragdropid = l_dragdrop_handle.
INSERT ls_drag_cell INTO TABLE lt_drag_cells.
CLEAR ls_drag_cell.
ls_drag_cell-fieldname = <fs_bisu>."l_field. 9th May
ls_drag_cell-dragdropid = l_dragdrop_handle.
INSERT ls_drag_cell INTO TABLE lt_drag_cells.
CLEAR ls_drag_cell.
ENDLOOP.
DATA: l_index TYPE i,
l_erg TYPE i.
LOOP AT g_t_plan_alv_m.
l_index = sy-tabix.
l_erg = sy-tabix MOD 2.
IF l_erg EQ 0.
g_t_plan_alv_m-handle_dragdrop = lt_drag_cells.
g_t_plan_alv_m-tabcolor = lt_tabcolor.
MODIFY g_t_plan_alv_m INDEX l_index "FROM ls_outtab
TRANSPORTING handle_dragdrop
tabcolor.
ENDIF.
ENDLOOP.
LOOP AT g_t_plan_alv_m.
l_index = sy-tabix.
l_erg = sy-tabix MOD 2.
IF l_erg EQ 0.
g_t_plan_alv_m-handle_dragdrop = lt_drag_cells.
g_t_plan_alv_m-tabcolor = lt_tabcolor.
MODIFY g_t_plan_alv_m INDEX l_index "FROM ls_outtab
TRANSPORTING handle_dragdrop
tabcolor.
ENDIF.
ENDLOOP.
CALL METHOD g_plan_alv->set_table_for_first_display
EXPORTING
is_variant = l_variant
i_save = g_save
is_layout = g_plan_layo
it_toolbar_excluding = l_alv_exclude_tab[]
CHANGING
it_outtab = g_t_plan_alv_m[]"gt_outtab_source[]
it_fieldcatalog = g_t_plan_fcat[].
ENDFORM. " DRAGDROP
FORM event_ondrag USING e_row TYPE lvc_s_row
e_column TYPE lvc_s_col
e_dragdropobj TYPE REF TO
cl_dragdropobject. "#EC
DATA:
l_obj TYPE REF TO lcl_dragdrop_obj.
CREATE OBJECT l_obj.
READ TABLE g_t_plan_alv_m INDEX e_row-index. "9thMay
IF sy-subrc EQ 0.
l_obj->line = g_t_plan_alv_m."ls_outtab.
l_obj->index = e_row-index.
e_dragdropobj->object = l_obj.
ENDIF.
ENDFORM. " EVENT_ONDRAG
FORM event_ondrop USING e_row TYPE lvc_s_row
e_column TYPE lvc_s_col
e_dragdropobj TYPE REF TO
cl_dragdropobject. "#EC
DATA: l_obj TYPE REF TO lcl_dragdrop_obj,
ls_outtab LIKE g_ty_s_outtab.
CREATE OBJECT l_obj.
IF e_row-index IS INITIAL.
e_row-index = 1.
ENDIF.
CATCH SYSTEM-EXCEPTIONS move_cast_error = 1.
l_obj ?= e_dragdropobj->object.
ls_outtab = l_obj->line.
MODIFY g_t_plan_alv_m INDEX e_row-index.
ENDCATCH.
IF sy-subrc <> 0.
CALL METHOD e_dragdropobj->abort.
ENDIF.
ENDFORM. " EVENT_ONDROP
*& Form EVENT_ONDROPCOMPLETE
* -->P_E_ROW text
* -->P_E_COLUMN text
* -->P_E_DRAGDROPOBJ text
FORM event_ondropcomplete USING e_row type lvc_s_row
e_column type lvc_s_col
e_dragdropobj type ref to
cl_dragdropobject."#EC
data: l_obj type ref to lcl_dragdrop_obj,
ls_stable type lvc_s_stbl,
lr_grid type ref to cl_gui_alv_grid.
ls_stable-row = c_on."con_true.
ls_stable-col = c_on."con_true.
catch system-exceptions move_cast_error = 1.
l_obj ?= e_dragdropobj->object.
endcatch.
lr_grid ?= e_dragdropobj->droptargetctrl.
call method lr_grid->refresh_table_display
exporting
is_stable = ls_stable.
ENDFORM. " EVENT_ONDROPCOMPLETE
*& Form EVENT_ONDROPGETFLAVOR
* -->P_E_ROW text
* -->P_E_COLUMN text
* -->P_ES_ROW_NO text
* -->P_E_DRAGDROPOBJ text
* -->P_E_FLAVORS text
FORM event_ondropgetflavor USING p_e_row
p_e_column
p_es_row_no
p_e_dragdropobj
p_e_flavors.
ENDFORM. " EVENT_ONDROPGETFLAVOR -
PR to PO creation drag & drop partner funtion not working.
Hi,
While creating the PO by using Drag & Drop function in ME21N, the partner function (PI,OA) of the vendor are not appering in P.O. Header except VN funtion. But if we created the P.O. Manually (with same PR) it is appering in P.O. I would like to know is this standard fuctionality of SAP or it has any patch/Note to correct it?hi Jitendra Kinja
i am facing a simlar kind of issue in my SAP system , is there any workaround for this?pl let me know
thanks
Dkmurthy -
Today this issue started, originally in 2.0, updated to 2.1 and issue continues.
Issue: DRAG & DROP feature with mouse (or pad on laptop) will select multiple photos, (with CTRL & SHIFT key as typical with Windows machines)but when I try to move them to a different folder, or drop them onto a keyword, it will not work.
Specifically, I select two photos to move to a different folder, the selection work, but when I try to "grab" the selected photos, Lightroom defaults to One Photo, and it will not grab it to move it. However, I can "right click" on the intended folder and can select "move selected photos to folder" and that works. This issue also applys to assigning keywords, and I would assume other similiar actions. I should note, that I can "rotate", assign "labels", "stars", and Keywords from Keyword sets, it just happens with the "Drag & Drop" feature.
Help
The feature works correctly in other Windows programs, so I'm sure it's related to Lightroom and not the mouse.
I have a Windows Vista machine, 3GB RAM 160GB HD, ~ 75% free space, AMD Turion X2 Dual Core 70 Processor. Everything has worked fine up until this morning.
Prior to upgrading to 2.1, I optimized my Catalogue. Everything seems to work fine except this feature.
HelpDrag by the actual image area of the thumbnail, not the surrounding 'fake slide' cell.
That's a feature of Lightroom's grid view. Clicking on image area of thumbnail keeps the multiple selection and makes the image clicked the primary select. Clicking on the outer thumbnail area deselects all but the active image. -
Issue with Drag/Drop of multiple rows from ListView
I am working on a sample application with 2 list views i.e. players and team, and implement drop and drop such that players can be dropped from one list view to the other. Everything is working as expected when there is single selection model is enabled on the source list view. However, if I enabled Multiple selection model and drag 2 or more rows from source list view to target list view, seeing the following exception after the drop is completed.
Exception:
java.lang.IllegalArgumentException: Only serializable objects or ByteBuffer can be used as data with data format [subListPlayers]
at com.sun.javafx.tk.quantum.QuantumClipboard.putContent(QuantumClipboard.java:513)
at javafx.scene.input.Clipboard.setContent(Clipboard.java:230)
1) What should be the DataFormat used in order to be able to drag and drop multiple rows? Looks like we do not have for Object type, so I have created the following one which does not solve the problem.
private DataFormat dataFormat = new DataFormat("subListPlayers");
2) I have made changes to support serialization on the data object which also does not seem to solve the issue. Tried by implementing Serializable interface as well as by implementing Externalize interface.
Can someone please guide if there is an easy way to implement this behavior?
Code:
public class Player
private String name;
public Player(String name)
this.name = name;
public String getName()
return name;
public void setName(String name)
this.name = name;
@Override
public boolean equals(Object o)
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Player player = (Player) o;
if (name != null ? !name.equals(player.name) : player.name != null) return false;
return true;
@Override
public int hashCode()
return name != null ? name.hashCode() : 0;
public class JavaFXDnDApplication extends Application
private static final ListView<Player> playersListView = new ListView<Player>();
private static final ObservableList<Player> playersList = FXCollections.observableArrayList();
private static final ListView<Player> teamListView = new ListView<Player>();
private static final GridPane rootPane = new GridPane();
private DataFormat dataFormat = new DataFormat("subListPlayers");
public static void main(String[] args)
launch(args);
@Override
public void start(Stage primaryStage)
primaryStage.setTitle("Drag and Drop Application");
initializeComponents();
initializeListeners();
buildGUI();
populateData();
primaryStage.setScene(new Scene(rootPane, 400, 325));
primaryStage.show();
private void initializeListeners()
playersListView.setOnDragDetected(new EventHandler<MouseEvent>()
@Override
public void handle(MouseEvent event)
System.out.println("setOnDragDetected");
Dragboard dragBoard = playersListView.startDragAndDrop(TransferMode.MOVE);
ClipboardContent content = new ClipboardContent();
// content.putString(playersListView.getSelectionModel().getSelectedItem().getName());
content.put(dataFormat, playersListView.getSelectionModel().getSelectedItems());
dragBoard.setContent(content);
teamListView.setOnDragOver(new EventHandler<DragEvent>()
@Override
public void handle(DragEvent dragEvent)
dragEvent.acceptTransferModes(TransferMode.MOVE);
teamListView.setOnDragDropped(new EventHandler<DragEvent>()
@Override
public void handle(DragEvent dragEvent)
// String player = dragEvent.getDragboard().getString();
// ObservableList<Player> player = (ObservableList<Player>) dragEvent.getDragboard().getContent(dataFormat);
String player = dragEvent.getDragboard().getString();
teamListView.getItems().addAll(new Player(player));
playersList.remove(new Player(player));
dragEvent.setDropCompleted(true);
private void buildGUI()
// rootPane.setGridLinesVisible(true);
rootPane.setPadding(new Insets(10));
rootPane.setPrefHeight(30);
rootPane.setPrefWidth(100);
rootPane.setVgap(20);
rootPane.setHgap(20);
rootPane.add(playersListView, 0, 0);
rootPane.add(teamListView, 1, 0);
private void populateData()
playersList.addAll(
new Player("Adam"), new Player("Alex"), new Player("Alfred"), new Player("Albert"),
new Player("Brenda"), new Player("Connie"), new Player("Derek"), new Player("Donny"),
new Player("Lynne"), new Player("Myrtle"), new Player("Rose"), new Player("Rudolph"),
new Player("Tony"), new Player("Trudy"), new Player("Williams"), new Player("Zach")
playersListView.setItems(playersList);
private void initializeComponents()
playersListView.setPrefSize(250, 290);
playersListView.setEditable(true);
playersListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
playersListView.setCellFactory(new Callback<ListView<Player>, ListCell<Player>>()
@Override
public ListCell<Player> call(ListView<Player> playerListView)
return new ListCell<Player>()
@Override
protected void updateItem(Player player, boolean b)
super.updateItem(player, b);
if (player != null)
setText(player.getName());
teamListView.setPrefSize(250, 290);
teamListView.setEditable(true);
teamListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
teamListView.setCellFactory(new Callback<ListView<Player>, ListCell<Player>>()
@Override
public ListCell<Player> call(ListView<Player> playerListView)
return new ListCell<Player>()
@Override
protected void updateItem(Player player, boolean b)
super.updateItem(player, b);
if (player != null)
setText(player.getName());Yeah, this is a pain. I filed https://javafx-jira.kenai.com/browse/RT-29082 a while back. Go ahead and vote for it if you are inclined...
I think the issue in your case is that the observable list provided by MultipleSelectionModel.getSelectedItems() is not Serializable. So even if you make your Player class Serializable, the list itself isn't. The first thing I would try, I think, is to make Player implement Serializable and then pass in an ArrayList instead of the observable list. So you can do
content.put(dataFormat, new ArrayList<Player>(playersListView.getSelectionModel().getSelectedItems()));
and
List<Player> player = (List<Player>) dragEvent.getDragboard().getContent(dataFormat);
teamListView.getItems().addAll(player);
If that doesn't work, a workaround is just to store the "dragged list" in a property:
final ListProperty<Player> draggedPlayers = new SimpleListProperty<Player>();
// Drag detected handler:
content.putString("players");
draggedPlayers.set(playersListView.getSelectionMode().getSelectedItems());
// Drag dropped handler:
if (dragboard.hasString() && dragboard.getString().equals("players")) {
teamListView.getItems().addAll(draggedPlayers.get());
draggedPlayers.set(null); -
Home Sharing between Mac & PC - Can't drag & drop from one to the other.
I have a Mac & a PC. I turned on home sharing and it works well, except that I want to copy all of the music on the Mac over to the PC. With Home Sharing active, you should be able to drag & Drop, but I can't. I read the help article and it says that the computer icon of the remote computer that you are sharing from should be in the left pane under Shared in iTunes. I don't see this. I only see my library.
Any suggestions?these reads may be helpful:one and two.
JGG
Maybe you are looking for
-
i have created a view with three functions in it as shown below ================================================= 1. days(SYS_CONTEXT('DISCO_CONTEXT','P_AS_OF_PERIOD')) 2. decode( check_nonworkingday(gd.transaction_date) ,'N',gd.transaction_date- 1,g
-
How do I convert a DV video file to an AIFF file?
Can anyone recommend a good tool for converting a raw DV file that I recorded from a DV camcorder into iMovie 11 to an AIFF audio file? I was able to convert to an mp3 file with FLV Crunch but it is does not allow me to go directly to AIFF. I would a
-
How to display the current date in a CP5 project?
What is the best way to display the current date into captivate?
-
I was trying to get all my contacts from my ipod to my iphone and when I had signed into my icloud and itunes account my phone had gotten the contacts from my moms phone. Which were on neither of my accounts. Is there a way I can delete all of them f
-
Quicktime will not save file or move to another disk
I am consolidating old material to a new drive. I have quicktime complete movies created years ago in Final Cut. The movies play fine, but I get only error messages when trying to copy/move the files to the new hard drive. The icon on the OLD drive i