cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive Form

Former Member
0 Kudos

Hi Friends

I have developed interactive pdf form..

When i click the button it diaplayy PDF form....

but when click the button ,the run exception is arised...

java.lang.ClassCastException

at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.modifyDataType(InteractiveForm.java:875)

at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:342)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:887)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)

... 26 more

What i missed..

this is code

wdDoInit()

wdContext.currentContextElement().setPdfSource(WDVisibility.NONE);

wdContext.currentNameElement().setName(wdContext.currentNameElement().getName());

InACtion

wdContext.currentContextElement().setPdfSource(WDVisibility.VISIBLE);

Please Help Me...

Thanks & regards

Mathi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Dont bind the pdfSource property of Interactive UI element to Visibility.

Instead bind the property visible of Interactive UI element to context attribute (PdfVisible) of type com.sap.ide.webdynpro.uielementdefinitions.Visibility and then

wdDoInit()

wdContext.currentContextElement().setPdfVisible(WDVisibility.NONE);

wdContext.currentNameElement().setName(wdContext.currentNameElement().getName());

InACtion

wdContext.currentContextElement().setPdfVisible(WDVisibility.VISIBLE);

Former Member
0 Kudos

Hi,

I follwed ur mathod...

But yhis error produced...

Thanks..

Former Member
0 Kudos

HI Mathi,

which error produced??

What exactly is ur requirement??U want to see the pdf in same view or in different view??

In case u want in different view,just fire the plug for other view where ur form is available & in case u want it on same view ,then take a container & set the visibility for that container on button click.

For further info just go thru these documents.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">adobe [original link is broken] [original link is broken]

check SAP Interactive Forms by Adobe in this link.

regards

Sumit

Former Member
0 Kudos

Hi,

Thanks..

Same View....

Thats too when i button click then only open Pdf Form(interactive form)...

Please Help me..

Thanks

Former Member
0 Kudos

Hi,

If you have created a Interactive Form in a different view, then

On click of the button trigger a action and in that action

fire a plug to the view.

If you have created the InteractiveForm UI element in the same view and you want to show that form on click of a button,then create a action and assocaite it with the button.

create a context attribute (PdfVisible) of type com.sap.ide.webdynpro.uielementdefinitions.Visibility and bind the property visible of InteractiveForm UI element to context attribute (PdfVisible) and then

wdDoInit()

{

wdContext.currentContextElement().setPdfVisible(WDVisibility.NONE);

wdContext.currentNameElement().setName(wdContext.currentNameElement().getName());

}

InACtion on button click

wdContext.currentContextElement().setPdfVisible(WDVisibility.VISIBLE);

Note: Also check if you have configued your engine to support execution of Adobe forms

For configuring Adobe check out

http://help.sap.com/saphelp_nw2004s/helpdata/en/37/504b8cbc2848a494facfdc09a359b1/content.htm

Former Member
0 Kudos

HI,

If i map View context is (Pdf Form Visibily)Visibility..then my context controller is Binary...

So How i map...

Former Member
0 Kudos

Hi Mathi,

I think u got confused with pdfSource & Visibility.pdfSource will be of type binary & will be binded to pdfSource property of Interactive form.For visibility u need to have a different context attribute of type visibility & it will be binded to visibile property of Interactive form.

On click of button u need to set the visibility.

I hope its clear now.

regards

Sumit

Former Member
0 Kudos

Hi

Thanks for ur reply..

You mean two PDF source

one for UI element(binary)

Another one for PDFsource visibility right...

Thanks

Former Member
0 Kudos

Hi Mathi,

2 context attributes.1 for pdfSource (binary) & 1 for visibility(any name).I suggest u to go thru the tutorials available on sdn for adobe forms first ,then it will be clear to u i hope.

regards

Sumit

Former Member
0 Kudos

Hi,

Dont get confussed.Do as I say,

Initially you had mapped the context attribute PdfSource to pdfSource property of Interactive UI element.

Now remove this mapping and map the visible property of Interactive UI element to the context attribute PdfSource.

Run your application

To get more understanding on passing data to the interactive form go though the tutotrial

<a href="http://Go through the tutorial to understand properties of Interactive UI element">Interactive form</a>

Message was edited by:

Shriram Kabra

Former Member
0 Kudos

Hi,

Thanks For ur Reply....

1.To create context attribute and map to the controller with PDfsource==>done

2.Create another one context attribute for visibilty==>done

My silly and greate confusion is

wdDoInit()

wdContext.currentContextElement().setPdfVisible(WDVisibility.NONE);

if this code write in methodwdDoInit(),Arises null poiter exception....

if i comment means interactive form must not be empty....

What is actual need...

<b>wdContext.currentNameElement().setName("bbb");</b>

InACtion

wdContext.currentContextElement().setPdfVisible(WDVisibility.VISIBLE);

Please Help me...

Because i tried this same requirement more then one week....

Thanks....

Mathi s

Former Member
0 Kudos

Hi,

Check the cardinality of the node <b>Name</b>.

If it is 0..n then change the cardinality to 1..n

Former Member
0 Kudos

Hi,

Thanks....

Interactive form always diaplyed....

But i want When button click and then display the PDF form...

Please tel me..

Thanks & regards

Matthi

Former Member
0 Kudos

Hi,

I had alreadt give the steps for that, Anyhow please find below the same

Hi,

If you have created a <b>Interactive Form in a different view</b>, then

On click of the button trigger a action and in that action

fire a plug to the view.

If you have created the <b>InteractiveForm UI element in the same view</b> and you want to show that form on click of a button,then create a action and assocaite it with the button.

create a context attribute (PdfVisible) of type com.sap.ide.webdynpro.uielementdefinitions.Visibility and bind the <b>property <i>visible</i> of InteractiveForm UI element</b> to context attribute (PdfVisible) and then

wdDoInit()

{

wdContext.currentContextElement().setPdfVisible(WDVisibility.NONE);

wdContext.currentNameElement().setName("bbb");

}

InACtion on button click

wdContext.currentContextElement().setPdfVisible(WDVisibility.VISIBLE);

Former Member
0 Kudos

Hi,

I used the same thing....

If we use the visiblility,occupied the space for UI element

Thanks & regards

Mathi

Former Member
0 Kudos

Thank you so much....

My problem is solved...

I am not set PDFvisible to visible property....

Former Member
0 Kudos

Hi,

Let me know how did you solve the problem

Former Member
0 Kudos

I am not set visible(pdfvisible) to ui element visible property

Thanks..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mathi,

What r u trying to do with this code???

"wdDoInit()

wdContext.currentContextElement().setPdfSource(WDVisibility.NONE);

wdContext.currentNameElement().setName(wdContext.currentNameElement().getName());

InACtion

wdContext.currentContextElement().setPdfSource(WDVisibility.VISIBLE);"

pdfSource should be binary type & it should be binded to ur pdfSource property of ur interactive form.There is no need for setting the visibility for PDF files.If u want to hide or show something in interactive form ,u have to go for java script or form calc.

In general if on click of a button in webdynpro screen,u want to display a pdf form,no need to set any visibility.

regards

Sumit

Former Member
0 Kudos

Hi,

Please tel me

How to Diaply PDF form as Button click

Thanks..