cancel
Showing results for 
Search instead for 
Did you mean: 

Why does transfer of data InputField <-> Value Attribute not work?

Former Member
0 Kudos

Hello Forum,

I'm just starting to learn Web Dynpro Java. In the book "SAP NetWeaver Portal" from SAP PRESS, I followed the Web Dynpro example application from chapter 6.4. It is supposed to accept your name on one View ('StartView') in an InputField and show it on the next View ('ResultView').

The InputField on the first View is associated with the Value Attribute "Context -> Node1 -> My_Name". Similarly, on the ResultView there is a TextView that has as its text attribute "Context -> Node1 -> My_Name" (as selected from the attribute popup).

The problem is that the string that I enter into the InputField on the 'StartView' doesn't get shown on the TextView of the 'ResultView'.

What could be the problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are both the context mapped.

I mean view1 mappend to component controller and then view2 mapped to component controller context and you are accessing the same copy of the context.

Regards,

Murtuza

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello everybody, and thank you for your support.

I've done now like Praveen told me, however it still doesn't work.

Can it be that the patch level of of my SAP installation (9) is at fault? Any other ideas?

Best regards,

Florian

former_member485701
Active Participant
0 Kudos

Hi,

Can you tell me in step by step that what you have done?

Regards,

Praveen

Former Member
0 Kudos

Check if TextView.text and InputField.value properties are bound to the mapped attribute.

Armin

former_member485701
Active Participant
0 Kudos

Hi Florian,

Go to your Component controller ande create

Context -> Node1 -> My_Name

And in your both views you have

Context -> Node1 -> My_Name

Now do the following steps:

(1) In the required controller of both view add component controller.

(2) right click on Node1 in start view and edit context mapping with component

controller's Node1 and select the attributes.

(3) Do same thing in Result view also

Your problem is solved now.

Regards,

Praveen

Former Member
0 Kudos

Hi Florian,

All the contexts in a webdynpro application (from views and controllers) "communicate" with each other through "mapping". View elements "communicate" with context through "binding".

View contexts are private. They are not exposed to other views. So they get connected to each other through a component controller or a custom controller.

So, View A context has to be mapped with Controller's context which will be mapped to View B's context, and then the value of the input field is "mirrored" in View B.

It seems you missed the mapping step to the component controller.

Regards,

Rajit