on 10-12-2009 7:46 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi,
Do not use the button in the Library tab, Use the "Submit to SAP" button for this action to work.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.