cancel
Showing results for 
Search instead for 
Did you mean: 

How to Capture selected ID

Former Member
0 Kudos

Hi All,

Please Clear my doubt...

I have created a table for Id,name,Postion

like

Id Name Postion

1001 Ronald 004

1002 GR 006

1003 UT 004

If i selected 1001 and (via click the button) go next page(for selected id information)...

The next page have the button for dialog box...

That dialog box have to diaply content of that main table same table

1001 Ronald 004

1002 GR 006

1003 UT 004

How to get selected Id from main table to dailogbox....

Please Tel me

Thanks& regards

mathi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

To get the selected id from the table

String selected id=wdcontext.currentTableElement().getId();

Regards,

Naga

Former Member
0 Kudos

Hi,

What i have understood from your post is that you select a value in the table and you want to show the ID of the selected row in the confirmation dialog.

If that is the case, you can do it as below

IWDControllerInfo controllerInfo =

wdControllerAPI.getViewInfo().getViewController();

String dialogText = "<generate a string here by ggetting the values from the context and use this string as a dialog text>";

For ex : String disalogText = "The selected ID is "+wdContext.currentRecruitmentListElement().getId();

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(

dialogText,

controllerInfo.findInEventHandlers("ok"),

"ok");

Create a event handler "ok" in the view controller

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">For more info on how to create a dialog</a>