cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass the value from one view to another view

Former Member
0 Kudos

Hi.

I created one component with two different views.

First view is having service order number and one Button.

Second view is having the related data in input fields.

I provide the Navigation link also. Navigation is working fine.

But the second view does not display the data.

I did not understand how to capture the values from one view and placed it in another view context node attributes.

Regards,

B. Krishna.

Accepted Solutions (1)

Accepted Solutions (1)

former_member206299
Contributor
0 Kudos

Hi,

Does this component have a custom controller where the input field is bound.

Regards,

Sijo..

Former Member
0 Kudos

I tried by using the custom compoent also.

But i did not know how to put the data to the custom component or how to display the data from the custom component.

Can you please explain how to work on custom component with in the view.

Here i assign the Input fields directly from the view context node.

Thank You.

Krishna.

former_member206299
Contributor
0 Kudos

Hi,

First create a custom controller and add the conext node having the attribute which is ur input field.

then u can use the below code in ur view 2 to get the value entered in the first view.....

... lr_cuco ?= controller->get_custom_controller( 'CRMCMP_BPIDENT/CuCoBuPa' ).
  check lr_cuco is bound.

  lr_entity ?= lr_cuco->typed_context->context node->collection_wrapper->get_current( ).
  check lr_entity is bound.

  lv_account_name = lr_entity->get_property_as_string( iv_attr_name = 'attribute name'  ).

Regards,

Sijo....

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Have u created Custom Controller for the component??

If not create one custom controller and add context nodes from which u want to read data and in which context node u want to use that data.

Suppose u have 2 view like view1 and node1 , view 2 node2.

U want to read data in view 2 contextnode ie. node2 from view1 context node. Add both nodes ie. node 1 and node 2 in custom controller .

Now use this custom controller in view 2 for reading data from node1.

for refrence check EH_ONSAVE method of BT120H_CPL/OVViewSet .

Regards

Gaurav