cancel
Showing results for 
Search instead for 
Did you mean: 

How to have multiple forms in Web Dynpro

Former Member
0 Kudos

Hi

My requirement is the following: A Web Dynpro Application with an interactive form and an option to display two additional different interactive forms on demand. I tried to have three interactive form in the same view with three context variables containing the three binaries (pdfsource). It is showing me three dfferent pdfs, but when I access the pdfs via wdContext.currentContextElement().getfirstPDF() or wdContext.currentContextElement().getsecondPDF(), it is always returning the same pdf.

What could be my error here?

Thanks a lot for your help

Kind regards

Bettina Hepp

Edited by: Bettina Hepp on Apr 1, 2008 9:48 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member214651
Active Contributor
0 Kudos

Hi Bettina,

Try using the same PDF Source (Binary Type) for all the PDF's and create 3 separate Value Nodes (Data Source) for the 3 PDF's.

Based on the selection try hiding the forms using the VISIBILITY attribute.

Hope this helps u

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith MV,

thank you very much for the quick answer. I don't really understand what you mean. If I only have one single binary context attribute as PDF source, how can I decide which pdf should be stored in this variable?

Hiding is not an issue, I have set width and height to a small value as I had trouble with the visibility attribute

It seems as if I should create the pdf in the background without using the binary context node at all

Best regards

Bettina

former_member252723
Participant
0 Kudos

Hi,

I think u can use three View Containers and in each view container each form and call the interactive using these view containers.....

Or U can create a value node by name Form which contains the value attribute as Form Name and the TemplateSource.....

In the Component controller write a method which will set the form name and template source....

Code :

IPublicFormsDisplayPrintComp.IFormsListElement element;

IPublicFormsDisplayPrintComp.IFormsListElement newElement = wdContext

.nodeFormsList()

.createFormsListElement();

newElement.setDisplayName("abcform");

newElement.setFormTemplate("abc.xdp");

wdContext

.nodeFormsList()

.addElement(newElement);

Similarly add all the forms using the above code.

Take a table control and bind this FORM VN with it and in the modify view in which ur displaying the form write the following code to call the form....

IWDInteractiveForm interactiveForm = (IWDInteractiveForm)

view

.getElement("InteractiveForm");

interactiveForm

.setTemplateSource

(wdContext

.currentFormsListElement()

.getFormTemplate());

In the Interactive form Properties set the Pdf Source and the template source .

Hope it will work for u.

Regards

Mustafa.

Former Member
0 Kudos

Hello Mustafa

thank you so much for the helpful answer. As far as I understand you, I have to:

1. Create a context node list for pairs of names and templates

2. Create an Interactive Form Layout Element with the IWD-Api.

What do you mean with "Take a table control and bind this FORM VN with it"

And why in the modify view?

Regards

Bettina

former_member252723
Participant
0 Kudos

Hi...

U need to create a table and two columns so that in one column u can have the form name and in other u can have the button to display the form.

regards

Mustafa.

Former Member
0 Kudos

Hi Mustafa

I solved the problem differently, but I have to thank you very much for your time!

My solution:

I generated the pdf in the backgound, afterwards I created an URL to this pdf and then I opened the URL in a new window. This was possible, because I only needed a read-only pdf, no true interactive form.

Kind regards

Bettina