on 06-13-2006 4:39 PM
Hi All,
we have a bapi which gives the list of sales order, which we are displaying in a Resultview in a table. The user has a privilege to click on a particular record which will display the details of that record in a different view.
Now my problem is how to get the data of the selected record from the list in the details view.
Should i bind the details views with the custom controller where i have the details of all the sales order, if so then how can i get that specific record which the user has clicked.
Hi,
If your have the context mapped correctly between your two views (results table view and document detail view) you shouldn't have to do anything. You should have your context node declared in the controller (say the node is called Sales_Order_List_Output.) You should map this node to both header and detail views.
When the user clicks on an entry in the table, that row will become the current leadSelection row, and it's data can be accessed by wdContext.currentSales_Order_List_OutputElement() or similar depending on how you have named your context.
In your details view, simply map your fields to the correct node and you will always see the currently selected row here.
A supply function is over-complicated for this solution - you would normally use a supply function when you want to dynamically populate values of a node based on it's parent node.
Hope this helps,
Gareth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gareth,
let me clarify the problem once more. I have two views on first window. searchview and Listview(consist of table where i show the data based on the search criteria). Now my problem i want to pass the data which has been selected by the user (Single row) to the new window which is the details view where i have to show the detail data of the selected row.
my searchview and listview are binded by a custom controller which is binded by a model.Thus i have all the data but in the list view i am just showing some of the fields. while in the detail view i want to show all the fields related to that selected record.
Bind the detail fields to the attributes of the node that holds the search results. They will display (as already stated) always the lead-selected node element. (Probably these fields should also be set to read-only.)
In the results table, assign an empty action to the "onLeadSelect" event such that a server-roundtrip occurs when a different row is selected. The detail view will change automatically.
Armin
Hi Mukesh,
I would sugest you to do the following:
1) in context node which contains list of sales orders create model node which contains data about particular sales order and make this context node having supply function.
2) in supply function you can access parentElement which is actually the selected element from list of sales orders.
Supply functions are called when parent`s node lead selection is changed.
Another approach: you can use wdContect.current<NodeName>Element() method to get node lement which is "lead" selected.
Another approach: in case multi selection is enabled you can use somethig like I have suggested here
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.