on 07-26-2007 3:08 AM
Hello,
I have a table in main view binded to MainTable. In the details view it is binded detailsTable. How can I force the leadSelection change in the details view/detailsTable.
When the user changes the leadselection in the mainview/MainTable, In the Details View/DetailsTable, I have to show the details accordingly.
Thanks,
Sunita.
The detailsTable must be binded to some context node.
On lead selection in MainTable you can trigger the action which populates the context node binded to the DetailsTable.
Specify the action in the onLeadSelection property for MainTable. In this action populate the context node binded to the Details view according to the selection.
To get the value in selection you can simply do following call: wdContext.node<MainTableNode>.current<MainTableNodeElement>
This tutorial does exactly what you want:
<u>PDF:</u> https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/5f699f90-0201...
<u>Details:</u> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bind the details view to main node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys. It will be better to bind to same table node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Web Dynpro has been designed to support such master/detail scenarios very easily.
Just bind the details form to the same attributes (inside the data source node) as the table cell editors, assign an empty action to the Table.onLeadSelect event (such that a roundtrip is triggered when the master selection changes). That' all.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunita,
Try this.
1> Go to the View create an action say populateDetails
2> Bind the action (populateDetails) in the onLeadSelect property of maintable.
public void onAction populateDetails (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
int n = wdContext.nodeMainTableNode().size();
int leadSelected = wdContext.nodeMainTableNode().getLeadSelection();
for (int i = 0; i < n; i++) {
if (leadSelected == i) {
IPrivateEpSyncView.IDetailsTableNodeElement DetailsTableNodeElement = wdContext.createDetailsTableNodeElement();
DetailsTableNodeElement.setPORTALID(wdContext.nodeMainTableNode().getMainTableNodeElementAt(i).getPORTALID());
DetailsTableNodeElement.setUSER(wdContext.nodeMainTableNode().getMainTableNodeElementAt(i).getPORTALNAME());
DetailsTableNodeElement.setROLE(wdContext.nodeMainTableNode().getMainTableNodeElementAt(i).getGROUPEXPRESSION());
DetailsTableNodeElement.setSTATUS(wdContext.nodeMainTableNode().getMainTableNodeElementAt(i).getSTATUS());
wdContext.nodeDetailsTableNode().addElement(DetailsTableNodeElement);
}
}
}
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.