on 12-01-2008 4:06 AM
hi experts,
please help me out with the following requirement.
I have a table displayed in my table_view with 3 feilds.if i select a row in the table and click details, then it should get the details(ie all 8 fields) in the table_details view.
I used the currentContextElement option but it gave me the details of the last row always..
thanks in advance..
jithin
Hi,
As i understand from your question is that you are getting data of the first and second view from single webservice/BAPI and you are displaying 3 columns in first view. On selection of row and button action navigation to second view and display all the details...
If above is correct then you can fetch all the details during 1st time excecution and display only the desired 3 columns in the table then set the lead selection, copy the context element into another node on this lead select. This way on second view you can bind the same node and all the details can be displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi.
can u please tell me how to copy the element in lead selection to the element of another node..
any code samples will be really helpful as i am new to WD java.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
suppose if u have two node node1 and node2
and u want to copy the selected element from node1 to node2,
int lead=wdContext().nodeNode1.getLeadSelection();
/////get attributes at lead selection
IPrivateView.INode1Element elem1 = wdContext().nodeNode1().getInode1ElementAt(lead);
String a =elem1.get<Attr1>();
//////create an elemnt of the node2 and set the attributes
IPrivateView.INode2Element elem2 = wdContext().nodeNode2().createNode2Element();
wdContext().nodeNode2().bind(elem2);
elem2.set<Attr1>(a);
Regards,
Satya.
hi ramesh,
i am displaying only 3 fields in my first view so how can i get all the 8 fields in my next view..??
i tried to display the 3 fields .. but when i trying to set the value to the dummy node .. i am getting an error as follows..
************cannot bind or add element, because it is already bound to a node
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i need to display the details in a different view.. so in which view should i write this..
the view in which i select the row or the view where the details are displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
if you want to display the selected data in different view follow the below steps,
1. create dummy context in component controller for holding the details of the selected row.
2.write my code in the view where you selected the row and place the selected attributes into the dummy context.
3.show the second view with the dummy context.
Regards,
ramesh
Hi,
for(int i=0;i<wdContext().node<mynode>.size();i++)
{
if(wdContext().node<mynode>.isSelected(i){
IPrivateView<myview>.I<mynode>Element>elem = wdContext.node<mynode>.get<Mynode>elementAt(i);
wdContext().node<mynide>.bind(elem);
elem.get<atr1>();
....
Regards,
Satya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Private<name>View.I<Table node name >Node node = wdContext.node<Table node name >();
Private<name>View.I<Table node name>Element ele;
ele = node.get<Table node>ElementAt(node.getLeadSelection);
ele.get<Att 1>(); // read the attributes at the selected row
.......
ele.get<Att 8>();
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
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.