cancel
Showing results for 
Search instead for 
Did you mean: 

Create Interactive Form UI element Dynamically

former_member183915
Active Contributor
0 Kudos

Hi Experts,

I have a requirement according to which i need to create multiple PDF forms at runtime.

The approach that i would be using is creating interactive form U I element at runtime.

So as a test application in a views wdDoModifyView i added the below

In the do modify view i have added the below piece of code



if (!firstTime)
{
			IWDNodeInfo l_sel_nodeInfo =
				wdContext.nodeCtx_vn_binary().getNodeInfo();
			IWDAttributeInfo l_attrInfo =
				l_sel_nodeInfo.getAttribute(
					IPrivateAdobeView1.ICtx_vn_binaryElement.CTX__VA__BINARY);

			if (view.getElement("adobeFrm") == null) {
				IWDTransparentContainer container =
					(IWDTransparentContainer) view.getElement(
						"RootUIElementContainer");

				IWDInteractiveForm adobeFrm =
					(IWDInteractiveForm) view.createElement(
						IWDInteractiveForm.class,
						"adobeFrm");

				adobeFrm.bindDataSource(
					wdContext.nodeCtx_vn_adobe().getNodeInfo());
				adobeFrm.setMode(WDInteractiveFormMode.UPDATE_DATA_IN_PDF);
				adobeFrm.setTemplateSource("AdobeView1_InteractiveForm.xdp");
				adobeFrm.setDisplayType(WDInteractiveFormDisplayType.NATIVE);
				adobeFrm.bindPdfSource(l_attrInfo);

				adobeFrm.setVisible(WDVisibility.VISIBLE);

				container.addChild(adobeFrm);

				adobeFrm.setTemplateSource("AdobeView1_InteractiveForm.xdp");

}

But now i am stuck at this point as its giving me null pointer exception on execution.

Could some one provide me links to the tutorials which contains dynamic creation of Interactive form UI element

Thanks in advance!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you post on which line you are getting the null pointer exception?

Regards,

Amol

former_member183915
Active Contributor
0 Kudos

Hi Amol ,

I did resolve the null pointer exception issue but i still need tutorials or code snippets or sample examples for Dynamic creation of InteractiveForm UI element .

If any opne has it then please do share the links.

Useful information would be highly appreciated

Reagards ,

Navya.

Former Member
0 Kudos

Hi Navya,

Please use the following link on Development of Interactive Adobe Forms for the Web Dynpro UI . I hope it would help.

http://help.sap.com/saphelpnw70/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm

Regards,

Usha

former_member183915
Active Contributor
0 Kudos

Hi Rekha ,

I do have this link but as per this tutorial the layout of adobe form is generated during design time whereas i need to create the mulitple PDF at runtime.These PDF need to be displayed to the user . The approach that i am using is to create Interactiveform U I element at runtime.

The code that i tried is already provided in my first post.I need some more concrete tutorials /examples for this.

Basically i need to know how to add elements like a table/textfield and data within those table/ textfields in an adobe form(Interactive form UI element) at runtime.

Regards ,

Navya.

Edited by: navya_4321 on Feb 2, 2011 6:22 AM