cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Get cursor location in XUI textbox for inserting characters

TomLeoboldt
1-Newbie

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:


System.out.println("About to insert TESTSTRING")


ADocument doc = (ADocument)xuiDoc;
ARange insertSpot = (ARange)doc.getInsertionPoint();
insertSpot.insertParsedString("TESTSTRING");


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.


Thank you,


Tom

0 REPLIES 0
Top Tags