Get cursor location in XUI textbox for inserting characters
We have a XUI dialog window which contains numerous textbox fields. On this same dialog, we have a button which when clicked, needs to insert a predefined text string at the cursor location in the textbox that had focus when the button was clicked. Note that the cursor may not be at the start of the value in the textbox. For example, the textbox may contain "Bob did this" and the cussor may be located right after the word "Bob".
The dialog I am referring to is a XUI dialog that is launched from a custom Java/AOM Arbortext application extension. The button event handler logic that gets called is as shown below:
When the dialog is displayed and I place the cursor in between two words in a textbox and click the button described above, I get the sysout message shown above but the text string is not inserted at the cursor location in the text field.
Am I on the wrong track here? Is there some other way that this type of task is accomplished in XUI/AOM? Any suggestions would be apprecaited.