cancel
Showing results for 
Search instead for 
Did you mean: 

Button catches the Event only on the second click

Former Member
0 Kudos

Hi Experts,

I am new to adobe forms and facing a very strange problem. I have 2 buttons on my interactive form "SUBMIT" & "APPROVE" , now the problem is whenever i load my application(Webdynpro ABAP) for the first time and click any of the 2 buttons the event

ONSUBMIT of the ui element Interactive form is not caught(control doesnt reach the event) , but when i click any of these buttons from the second time the control reaches the breakpoint successfully.

I donot understand where i am going wrong , is there some java script that needs to be written in the initialise event of the buttons to make them trigger the event from the first click itself.

Thanks In Advance,

Chaitanya.

Accepted Solutions (1)

Accepted Solutions (1)

chintan_virani
Active Contributor
0 Kudos

May be you are missing the Web Dynpro script which needs to be added in the form application. Do a little bit of Search on SCN and you will find it out.

Chintan

Former Member
0 Kudos

Hi Chintan,

I did import the webdynpro script as mine is a ZCI form, but still this issue persists.

Chaitanya.

chintan_virani
Active Contributor
0 Kudos

Have you used the "Submit" button type from WD Native Library for your buttons?

Chintan

Former Member
0 Kudos

Hi Chintan,

For one i used the submit button from the WDNATIVE and for the other a check field button.

Thanks,

Chaitanya.

chintan_virani
Active Contributor
0 Kudos

Okay but why are you using Check Fields button, any specific reason? Have a look at script for click event in ALD and post it here.

Also which Designer & Reader version are you using?

Chintan

Former Member
0 Kudos

Hi Chintan,

Thanks for your replies, there wasnt any specific reason for using check field buttons was just experimenting with the component.

Script in the Click event for button 1:

// DO NOT MODIFY THE CODE BEYOND THIS POINT - 802.20071213024549.437972.422152 - SubmitToSAP.xfo

ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");

// END OF DO NOT MODIFY

Script in the Click event for button 2:(i am setting a flag when it is clicked)

var ref3 = xfa.resolveNode("xfa.record.APPROVE");

var ref2 = xfa.resolveNode("xfa.record.APPROVE").value;

ref3.value = "X";

// DO NOT MODIFY THE CODE BEYOND THIS POINT - 802.20071213024549.437972.422152 - CheckFields.xfo

ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");

// END OF DO NOT MODIFY

Version of ALD : 8.1

Adobe Reader : 8.

Should there be some code written in the initialize event of the button ?

Thank you for your help so far,

Chaitanya.

chintan_virani
Active Contributor
0 Kudos

Well in the click event of button two you can just write ref3.rawValue = "X" and bind this to a WD context. Now you can easily check the context in WD and apply an if else condition to know which button was clicked.

Coming to main question, you are using Designer 8.1 but can you check with BASIS if you are on Ehp1 or Ehp2 for SAP NW 7.0 as it is a requisite as mentioned in Note 1176858

Reason and Prerequisites

Adobe LiveCycle Designer 8.1 can be used with the following ADS Versions and higher:

SAP EhP 1 for SAP NetWeaver 7.0

SAP EhP 2 for SAP NetWeaver 7.0

SAP EhP 1 for SAP NetWeaver 7.1

So just uninstall Designer 8.1 and downgrade it to 7.1 or 8 and see if it helps.

Chintan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Experts,

Could some please help me out with this issue...

Thanks In Advance,

Chaitanya.