cancel
Showing results for 
Search instead for 
Did you mean: 

Creating reusable UI elements ?

Former Member
0 Kudos

Hi all,

I'd like to know whether it's possible to create reusable building blocks of UI elements, to be later bind to context.

For example: users may create 0..n receipts at the same time

For each receipt, I have to display a form, which must be bound to the corresponding receipt element.

It is possible to create an UI element, let say ReceiptForm, in which I can add standards UI elements, such as InputFields, DropDown...?

This ReceiptForm could be later added to a view and bind to context elements (0..n), so that, at runtime, as many ReceiptForm as receipts elements from my context are displayed.

(Actually, I'd like to know if tables are the only way to design display of 0..n elements without programming each UI element)

Any information on this would really help.

Thanks a lot

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Create a Web Dynpro component for your task. If needed, this component can create its view(s) dynamically from the bound data.

Armin

Former Member
0 Kudos

Thanks Armin for your answer.

Can you please give me some more details about this ?

If I try to create a Web Dynpro component, the developer studio wizard ask me to create a window. I thought Windows were main application component, meaning you can display solely one at one time. In that case, I can't use this as those forms are to be embeded in an existing view.

Added to that, once that my component is created, I don't know where I can use it in my first component: even if I declare it to be used by my main component, I can't embed views in my main window, nor elsewhere.

Finally, it seems to me that Windows are heavy components, maybe much more that what I would need as form.

Thank you very much for your help

Former Member
0 Kudos

Maybe I misunderstood what you were talking about... Were you talking about IWDComponent ?

In that case, can you please explain me how to create it ? How to use it ?

Thanks a lot

Former Member
0 Kudos

Hi

This is possible by virtue of dynamic programming in WebDynpro where UI elements can be dynamically created and be bound to a dynamic or non dynamic contexts .

Check this sample tutorial on how to achieve this

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on dynamic programming of web dynpro applications.htm

Regards

Pran