cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Creation of form

Former Member
0 Kudos

Hi,

I need to create a web dynpro form that will filtered the fields to be displayed or set the property (mandatory or read only) based on 5 criteria selected by user. Due to complexity of the form, i need to create the form dynamically during run time in order to cope for occasional changes, thus minimum effort required for changes in DB, eventing, GP etc.

Anyone has any suggestion of how can i store the UIs, validation, and etc that relevant to the form creation? So that it's feasible to create the form during runtime by just read everything that is given from the source.

However i am understand that i can create the UI at runtime.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kanwalpreet,

Thanks for your replied.

Due to my development is in java based, i found a relevant information of dynamic creation of form in the below link: http://help.sap.com/saphelp_nw04s/helpdata/en/94/29984197eb2e7be10000000a1550b0/frameset.htm

By the way, do you have any idea of where or how can i store the UIs and validation for example in a list, so that only minimum effort (in UI, GP, validation)required in order to make changes to the form for example adds a new field.

Former Member
0 Kudos

Hi Jane

I think wot u need is at runtime fetch the no of fields with their visibility, mandatory and readonly property

I suggest that you create a ValueNode with attributes as fname,visibility and readonly. For every new field in UI add a element to this node.

At runtime you can loop through this node in wdModifyView and create the UI elements based on its attributes.

Regards,

Smruti

Message was edited by:

Armin Reichert

Answers (1)

Answers (1)

Former Member
0 Kudos

You will have to write the code in doModify

IWDAttributeInfo attinfo =

wdContext.getNodeInfo().getAttribute("<attribute name>");

IWDInputField ip = (IWDInputField)view.createElement(IWDInputField.class,null);

ip.bindValue(attinfo);

Like wise if it is a checkbox

IWDCheckBox cb = (IWDCheckBox)view.createElement(IWDCheckBox.class,null);

cb.bindChecked(<attribute info>)

chk it

http://help.sap.com/saphelp_nw04s/helpdata/en/94/29984197eb2e7be10000000a1550b0/frameset.htm