cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: InteractiveForm - Submit Action

Former Member
0 Kudos

Hi All,

I've couple of questions to the WDJ forum in Adobe Forms section,

1. for any interactive form embedded into WDJ appln, has 2 standard Events onSubmit and onCheck

I can successfully call the onCheck method on Runtime and it works for me.

But i've problem with onSubmit mehtod, it has 3 control types 'Regular, Execute & Submit'

I've used a Button field with all the said three options, but i wasn't successful with neither of the control types. Which one shud be used and how?

2. what if i've more than one submit buttons in a single form? how do i check which submit button called in my onSubmit event?

Thanks in advance,

MS

Accepted Solutions (0)

Answers (2)

Answers (2)

chintan_virani
Active Contributor
0 Kudos

Answer1: Drag and drop the Submit button from the Web Dynpro Native Library of the LiveCycle Designer. Do not change anything for the button. Check the JavaScript window in LiveCycle Designer, it should display something as follows:-

// 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

Answer2: Place twp submit buttons from WD Native and create a textfield (TextField1) in LiveCycle Designer which is bound to a context (TextFieldValue) defined in your Web Dynpro application. Hide the textfield in your layout.

When First button is clicked set its value to 1 and for button2 set its value to 2, so put the following JavaScript code in the click event of button1

TextField1.rawValue = "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

Make the appropriate change for button2.

Check the value of the context of the in onSubmit handler by putting a if else loop.

if(wdContext.currentContextElement.getTextFieldValue() == "1")
{
   // logic for button1
}
else if(wdContext.currentContextElement.getTextFieldValue() == "2")
{
  // logic for button2
}

Chintan

Former Member
0 Kudos

Hi Chintan,

Thanks for your replies.

Regd Ans1, i've checked the code you've specified in the java script under event 'click*'. The code is same and is not changed.

I've removed all my submit buttons, and added the Submit & Check Fields buttons freshly and deployed. As a result it was working before and after adding the buttons again nothing works. When i click on the both the buttons nothing is happing except the change in button color.

Could you diagnose the problem or the error i'm doing?

Waiting for your reply.

Thanks,

MS

former_member214651
Active Contributor
0 Kudos

Hi,

Do not use the button in the Library tab, Use the "Submit to SAP" button for this action to work.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith,

Ya, but there is no Library named with Submit to SAP in Standard Library and others too.

so i've used WebDynpro Native/Active Submits buttons with a tool tip to 'Submit the form data to SAP system'.

Please advice, whats went wrong?

Thanks,

MS

Former Member
0 Kudos

Hi All,

Any more responses/help on my questions ??

Thanks in advance,

MS