Possibility to retrieve the dataprovider for the curser

Hello, I would like to be able to get the dataprovider (column name) of the field the cursor is in. Is this possible?

Thanks!

What whould be the use?

I have to uses in mind:

  1. I want to write a method that shows a dialog with everything you need to know about a field (something like a “field stamp”). It shows you table name, field type, remarks… Something like an on-line documentation.

Of course, I don’t want to attach an action to all my fields. So if I could retrieve the dataprovider where the current cursor is…

  1. I want to do basically the same with the log. If you want to see changes of a certain field, you can create one global method that does that if you know for which field the user wanted the information.

Got the idea?

Thanks!

How are you planning to trigger that action if a user is in a textfield?
You have to add actions to all youre textfields to begin running a method anyway.
and with application.getMethodTriggerElementName() you can get the textfields name that is the trigger.

If I understand you right, the cursor is out of the field if you hit a button? I was hoping to either use a button, or just a method from the menu or (the best) a menu item from my self-defined menu bar :lol:

Currently it is not possible to get the active component to do it through a button or menu.
And a button will become the active component if it can get the focus (you have an option now to leave the cursor in the field when using a button that is not clickable and focusable)

But this won’t help you at the moment.