on 04-30-2008 3:39 AM
Hello Experts,
I'm new to JAVA WD.
Here is my scenario.
I have to use an Adobe form in a WDJ. The input parameters and the output parameters of the DC are defined in a method in the Interface Controller method.
The context of the Component Controller has the following structure
Context
---StartDate
---EndDate
---AbsenceType
Then the mapping between the Component controller and the interface controller is done so that the Interface controller also has the context structure as
Context
---StartDate
---EndDate
---AbsenceType
So now the interface controller and the component controller are bounded correctly.
Now I bind the view also with the Component controller as below.
Context
---StartDate
---EndDate
---AbsenceType
But since i need to use an Adobe interactive form inside this view, the datasource for the form cannot be the root context node but some other node. So I replicated the same structure in the view context so as to make the fields visible in the Adobe form context. Now the context looks as below.
Context
---StartDate
---EndDate
---AbsenceType
---DATA_NODE
-----StartDate
-----EndDate
-----AbsenceType
Now my question is, how do i map the result from the Adobe form into the context of the view??
What code should i write and where should i write to achieve this?
I need to do the following. But dont know how to write the code for this.
Context.StartDate = Context.DATA_NODE.StartDate
Context.EndDate = Context.DATA_NODE.StartDate
Context.AbsenceType= Context.DATA_NODE.AbsenceType
Please help!
Any help will be greatly appreciated.
Thanks,
Sam
Context.StartDate = Context.DATA_NODE.StartDate
Context.EndDate = Context.DATA_NODE.StartDate
Context.AbsenceType= Context.DATA_NODE.AbsenceType
wdContext.currentContextElement().setStartDate (
wdContext.currentDATA_NODE().getStartDate());
wdContext.currentContextElement().setEndDate(
wdContext.currentDATANODE().getEndDate()); // if it start date use that
wdContext.currentContextElement().setAbsenceType(
wdContext.currentData_NODE().getAbsenceType());
nikhiL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Nikhil for the swift response.
My requirement was a bit more different. Here the mapping are not within the same context but 2 different contexts as below.
InterfaceControllerContext.StartDate = ViewContext.DATA_NODE.StartDate
InterfaceControllerContext.EndDate = ViewContext.DATA_NODE.StartDate
InterfaceControllerContext.AbsenceType= Context.DATA_NODE.AbsenceType
Please let me know how I can access the Interface Controller nodes and attributes from within the implementation of the view at the press of a submit button. I don't want to do this by binding.
Thanks again for your help!
Sam
Go to view controllers properties page, under Required Controllers click on add button and add controllers you want.
If you graphically mapped view-component-interface controllers the values would have reflected in all.
Added Hints: Please not the order of execution is view.wdDoinit(), componentController.wdDoInit() and last execution is interface controller's init().
nikhiL
Thanks Nikhil for the info. But I cant do a graphical mapping here because the view context has to have the data elements inside a node and the CC and IC have the data elements directly on the context and there is no node. So I can't do a graphical mapping. I have to map the values through code dynamically.
Hello Nikhil,
I'm stuck with another small issue.
Let me first explain what I'm trying to do.
I have a view with the context structure as follows
Context
---DATA_NODE (Node)
----
----
---Data1
---Data2
All i need to do is, at the start of the view, i need to move the data from
Context.Data1=>Context.DATA_NODE.Data1 and
Context.Data2=>Context.DATA_NODE.Data2
Also, at the View Submit button click, I need to move the data from
Context.DATA_NODE.Data1 => Context.Data1 and
Context.DATA_NODE.Data2 => Context.Data2
(I managed to do this submit button click by calling an action->method and wrote the code as you gave earlier)
wdContext.currentContextElement().setData1(wdContext.currentData_NodeElement().getData1());
wdContext.currentContextElement().setData2(wdContext.currentData_NodeElement().getData2());
But I wrote at wdInit() for the view the code in the reverse way, but the values are not getting passed to the Data_Node and hence its not defaulting with the values from the elements of the context.
This is what I wrote.
wdContext.currentData_NodeElement().setData1(wdContext.currentContextElement().getData1());
wdContext.currentData_NodeElement().setData2(wdContext.currentContextElement().getData2());
Please let me know if I'm doing something wrong here.
Appreciate your help in advance!
Cheers,
Sam
Also, if i hardcode the value in the Init() method of the view its working.
wdContext.currentData_NodeElement().setStartData1("Hi");
But its not working if i assign it through code like this.
wdContext.currentData_NodeElement().setData1(wdContext.currentContextElement().getData1());
Please help!
Thanks,
Sam
Edited by: Mandrake on May 1, 2008 7:13 PM
Hi,
ADS Configuration Guide
UI elements in Adobe
Adobe & RFC
Access Mode & Presence
https://www.sdn.sap.com/sdn/developerareas/was.sdn?page=AdobeForms.htm
Check these links on Adobe forms
http://help.sap.com/saphelp_nw04/helpdata/en/1e/05853ff8ec2c17e10000000a114084/content.htm
https://www.sdn.sap.com/irj/sdn/interactiveforms
http://www.sap.com/solutions/solutionextensions/pdf/BWP_Interactive_Forms_Adobe.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.