cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Simpletype filed in the view to Component controller

Former Member
0 Kudos

Dear SDN Community,

I need to display the value of the drop down in another view. For this I have created the exact same ValueNode in the first View, component controller and the second view. When I try to map the SimpleType value attributes from the first View controller to the Component controller, I get the following error message at run time. The data type of this attribute in all contexts is string. I have deployed this application on 2004s SP12 platform.

<b>com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(TransferComponentView.TransferData.ExpenseId): must not modify the datatype of a mapped attribute </b>

Can you please advice how I can map it successfully and display this value in the second view.

Thanks!

Surya.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Surya

1) Create a Simple type STRING .

2) Add the required values you want to show in drop down in ENUMERATION tab of previously created Simple Type

3) Create a Strucure and add the previously created simple type in the strucure

4) Create a node in Component Controller and bind that to the First View's Controller

5) In your First you Create a DropDownByKey and bind Simple Type to selectedKey property of DropDownByKeyUIElement

-


6) Create a Value Attribute in Component Controller [to store the selected value in the DropDownByKey]

7)Bind that to the Second View's Component Controller

8)Now onClick() of button in First View

wdContext.currentContextElement().setTempSelectedValue(wdContext.currentDropdownElement().getDROP);

wdThis.wdFirePlugToSecond();

The problem in your scenario might be , creating a node in first view with Create with Structure Binding option, that will get the value of enumeration also.

in the second view , i think you created a simple value attribute ,where in there is no Enumeration for that..check once

Hope we both are in same track

Regards

Chaitanya.A

Former Member
0 Kudos

Chaitanya,

Thanks for your inputs. I am using the drop down box in my Adobe interactive form and I can't execute the following onClick event in the Adobe form.

wdContext.currentContextElement().setTempSelectedValue(wdContext.currentDropdownElement().getDROP);

Do you suggest any other place where I can call the above statement.

Thanks!

Surya.

Former Member
0 Kudos

Hi Surya

Use the same code in onSelect() event of DropDownByKeyUIElement

wdContext.currentContextElement().setTempSelectedValue(wdContext.currentDropdownElement().getDROP);
wdThis.wdFirePlugToSecond();

Regards

Chaitanya.A

Former Member
0 Kudos

Hi Surya

Please go through the link

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fd2d690-0201-0010-de83-b4fa0c93e1a9">Working with Offline and Online Interactive Forms</a>

Regards

Chaitanya.A