cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display data to the next screen

Former Member
0 Kudos

Hi Everyone,

I have an doubt. I have a created two view. In first view screen i have create one input field assume that user name as input field. when i am entering user name in first screen and i need to display the corresponding data to the second screen.

Please,let me know how can i write code for the second view.

Sekar Raj

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sekar,

Say you have two views v1 and v2. Since you are going to share the data between the views, it has to be present in the component controller. So in your component controller, define the context node with attribute username. In both views, drag and drop this context node to the view's context. So the mapped context node will be available as a node of the view itself.

In v1, do a set_attribute of the user_name. This will be available in v2 also. In the inbound plug handler for v2, read the context node, call your API to get the corresponding data and do a binding to the context. The data to be displayed need not be present in the comp controller, you can have it v2's context. That would suffice. You need to then create a navigation link between the views and fire the plug.

Regards

Nithya

Former Member
0 Kudos

Hi Nithya,

I got idea from your answer. I am trying as u said.

Thanks

Former Member
0 Kudos

Follow these steps.

1.Create 2 views

2.Create outbound plug with parameter called "name".

3.Create a button on one view and on action button creat a method and fire a plug which u have define .


 data lv_name type string.
  wd_This->Fire_Toresult_Plg( NAME = lv_name
  ).

4.Create a view alignment and bind it.

Hope this help.

Nirad

Former Member
0 Kudos

Hi,

you need to do following things

1. Create a attribute under a new node in Component Controller

2. Create a New view 'View1' and do the following:

- Copy the Component Controller attribute to the context of the View1

- In the Layout of the vIew1 add the Button and Create a New Action

- create a outbound Plug in the view1

3. Create a New view 'View2' and do the following:

- Copy the Component Controller attribute to the context of the View2

- create a inbound Plug in the view2

4. embed the view1 and view2 in the window

cheers

Former Member
0 Kudos

Hi Vinod,

Tks for immediate reply. I didn't ask how to navigate between two view. My question is how to display the data for the second screen.

For ex,

If i am creating input field as username in first view.

In second view, i am creating address field, ssn, etc...

When i am giving input for the first screen as 'DEVE' .

For this DEVE , i need to retrieve corresponding data and to display in to

the second screen.

Thanks

Former Member
0 Kudos

HI,

you need to create a attribute USer in component Controller and USe it in View and Do the COntext Mapping in B/w the View context and Component Context.

Create a method in the component Controller for the data selection based on the Input entered.

include a button in the view and create a Action for the Button and call the Compnent Controller method inside this action method.

cheers