cancel
Showing results for 
Search instead for 
Did you mean: 

Set cursor on the table column inherited with text edit UI element

Former Member
0 Kudos

HI folks,

I have 2 WD4A components , first components contains a table with one column as text edit for comments purpose. The data flows from second component to the first WD4A component.

When the data flows back to the first WD4A component I need to fill the comments.How can I set the cursor position or set the focus on the comments table column.

In short how can we set the cursor on the comments column of the Table UI element.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is an API of the View Object - REQUEST_FOCUS_ON_VIEW_ELEM.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/cb72dcbab83376e10000000a421937/frameset.htm

Former Member
0 Kudos

Hi Thomas,

Thanks for your help..

Former Member
0 Kudos

Hi Mr. Jung,

I am doing a task to enhance Formatted-Text-Edit,

The task's goal is: simultaneously edit/display text and image.

I decide to use Formatted-Text-Edit and Formatted-Text-View to realize the task.

In Formatted-Text-Edit, user can edit the text and input URL for image,

In Formatted-Text-View, the text and image can be displayed simultaneously.

I add a button "Insert Image" besides the Formatted-Text-Edit,

This is the key point:

When user click the button, I want to insert a new text(URL of the image) at the cursor's position in Formatted-Text-Edit,

User maybe input some text, then insert an image, then input another some text, etc.

So I have to insert a new text(URL of the image) at the cursor's position in FTE.

But how can I get the cursor's position, and insert a new text at the cursor's position in FTE.

Can you give me some suggestion or solution?

Many thanks in advance.

Best Regards,

Derek

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't believe that you can get the cursor position yet with the FormattedTextEdit UI element. The best you could do currently is to place the insert at the end of the current text.

Former Member
0 Kudos

Thank you! Mr. Jung.

It seemed that the way is blocked.

Would you answer me another question?

OfficeControl can create/save/close a MS Word Doc,

however, the Word Content is saved as XString content.

You know, Trex is a search engine in SAP.

The Word Content I create/save/close in OfficeControl, should be able to be searched by Trex.

So I have to extract plain text from MS Word(XString format), thus Trex can search the content?

How can I do that? How Can I extract plain text from MS Word?

Many thanks in advance.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can extract plain text from Word Document (I believe I answered this same question in the forum yesterday). It is easiest to do if the Word Document is in XML format. However it is still not an easy task as the XML document must be parsed to extract the text content from all the formatting informaiton.

Answers (0)