on 08-02-2007 9:11 AM
My scenario is like this..
I have two views in a component... in View 1 I have got some inputfields for entering data and checkboxes.. Based on the selection of the checkbox, RFCs wil l be getting called and the list is diplayed in the view 2.
My requirement is I need the information on what all checkboxes the user has selected(Veiw 1) in the View 2. How to pass this value from View 1 to View 2?.Based on that I need to perform some function calls in view 2..
Any suggestions are welcome..
Regards
SU
Hi,
For that you have to add the <b>value node</b> to the component controller's context. Then map this node to your first view controller and Second view controller. And after that you have to write the code for get select or unselect the checkbox value. For Example We have <b>checkboxgroup</b> element (for ex id = Sport) in our first view, and we have to bind it with created value node lets say it <b>'Sport'</b> with one value attribute 'Sport', type string.
Now write the following line of code in <b>public void wdDoInit()</b> to genetrate group of checkbox.
==================================================
ISportNode nodeSport = wdContext.nodeSport();
IPrivateEditMyDataView.ISportElement elementSport;
String[] sports =
{
"Athletics",
"Cricket",
"Basketball",
"Climbing",
"Hockey",
"Football",
"Running",
"Swimming",
"Sailing",
"Skiing",
"Tennis",
"Kabaddi",
"Other" };
for (int i = 0; i < sports.length; i++) {
elementSport = nodeSport.createSportElement();
nodeSport.addElement(elementSport);
elementSport.setSport(sports<i>);
nodeSport.setSelected(elementSport.index(), false);
}
===================================================
When you execute this code you will get group of checkbox under sport section with all the option as mentioned in sports array. If you select the any of those checkbox it will automatically pass to second view by the help of context mapping.
Hope this will help you.
regards,
Pankaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is very straight forward. Use context mapping to transfer data from view1 to view2. Use fireplugs to navigate. The handler of the plug can be used to invoke methods in your view2. Do not use the init() method in View 2 to process the request based on View1. All UI elements on View1 will be bound to the context. Pass the whole bunch via the component controller.
regards
LNV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.