cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and display fields dynamically in webdynpro on the same iview

Former Member
0 Kudos

Hi All,

Can anyone tell me how to display fields dynamically with the help of webdynpro .

On selecting input value from drop down box i should able to display different

fields(drop down box,input field,label.......).It depends on the input selected from dropdown box, which retrieves values from RFC.The fields which are to be displayed dynamically should retieve the data from RFC.It may vary from selecting different value from drop down box.means depending on the value we should able to disply the fields(drop down box,input field,label,.....).

so if anyone having the documents/blogs they can mail me

rajeshn16@yahoo.com

Note:Reward points will be awarded

Regards,

Rajesh

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks to all...problem solved thread is closed

Former Member
0 Kudos

It depends on the degree of variation you need.

If there is only a fixed number of different variants, you could create a view for each one and navigate to that view when the corresponding selection is done.

For even more flexibility, you can create UI elements programmatically depending on the current results from the RFC. This has to be done by adding code into method wdDoModifyView() (or static methods called from there).

Armin

Former Member
0 Kudos

Hi,

Here is a sample coding to create dynamic UI Elements.

wdDoModifyView()
{
IWDTransparentContainer root=(IWDTransparentContainer)view.getRootElement();
IWDInputField inpFld =(IWDInputField)view.createElement(IWDInputField.class,"inp_Fld");
inpFld.bindValue(wdContext.nodeNameNode().getNodeInfo().getAttribute("Name"));
root.addChild(inpFld);
}

Similarly you can create other UI Elements at run time...

regards,

Prabhakar.

balaji_bodagala5
Participant
0 Kudos

Hi Rajesh,

you have context which fileds we need to show or not,just group the controls and put it in container may be transparent container,the drop down button we have onchange action create the method there you can control the visible property of the contrianer as well as fill the context according to condition.

Thanks,

Balaji

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Rajesh

You have to play with dynamic programming here.

This Tutorial gives you an idea for dynamic generation of UI and context

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/74cda090-0201-0010-6b91-f85b2489...

Regards

Abhimanyu L