on 07-20-2007 3:51 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.