Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic Tray creation at runtime

hi experts,

we have a requirement where we are showing employee details in the tray UI element.

we have 1 tray at design time showing employee details obtained from a Bapi.

Now we need to display spouse details(if available) and children details(their number can be any~known at runtime) in seperate trays. eg each tray for 1 if there are 6 children, there are 8 trays including one for employee and spouse...

Now what I need is the source code or method to dynamically generate tray at runtime along with the labels and textviews they contain..

thanks in advance

Former Member
Former Member replied


here is the code to create tray and textview element in it dynamically.

place this code in wdDoModifyView()


IWDTransparentContainer container =(IWDTransparentContainer)view.getElement("RootUIElementContainer");

IWDTray inputTray = (IWDTray)view.createElement(IWDTray.class, "tray");

IWDTextView test =(IWDTextView)view.createElement(IWDTextView.class, "test");

test.setText("Tray Created");






Edited by: Ramesh Babu V on Oct 15, 2008 5:45 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question