cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up TextEdit -- Data Entry -- Saves in readonly TextEdit on View

Former Member
0 Kudos

Hi WD Gurus,

We have a readonly TextEdit for comments on our view. We have a "Add Comments" button which also has a corresponding Action method.

We need some code guidance so when user hits "Add Comments" button it should pop-up a TextEdit so user can enter new comments (should not have access to old comments). On hitting Save (may be a button on pop-up) the newly entered comments should get appended on the top of the old comments in readonly TextEdit on the view.

Help is much appreciated. We believe every answer is a help so we always reward points.

Thanks

Shahid

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shahid,

Use this tutorial to achieve your goal.

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/f1cfe990-0201-0010-22ac-dbe4cbdef5... [original link is broken]

Using this tutorial, you can come to know how you can show dialog box and retrive value you have entered in dailog box.

After retreiving values from dialog box attache that comment to the old comments as given below.

String new_comment = wdcontext.currentcontextElement().getnewComments();

if(new_comment!= null)

{

wdcontext.currentcontextElement().setoldComments(wdcontext.currentcontextElement().getnewComments() + " " + wdcontext.currentcontextElement().getoldComments());

}

Regards,

Bhavik

Former Member
0 Kudos

Thanks Bhavik You are the champ! problem solved

Answers (0)