on 01-11-2011 1:34 AM
Dear Experts,
I am working on web dynpro application where i created a normal table .
I am displaying selected row details in one container.. For this i write the code in OnLeadSelection event . But i want to display
the details when clicks on link in table cell instead of OnLeadSelection.
Any ideas ll be appreciated..
Thanks in Advance,
Kind Regards
kiran
Hello Kiran,
It is possible, we need trigger an event atleast like leadselection, or insteading of lead selection remove the lead selection and provide the check box for all the rows, on select of the check box display the values or place an input field and make it as read only then ask user to press enter on that particular field. But dont forget to write your implementation on OnEnter action of inputfield.
ya, as he said, even it is possible by placing linktoAction also. no issues. I messed up with the question you asked and provided answers. now i have corrected.
hope it helps. Revert for any clarification.
Regards
Nizamudeen SM
Edited by: Nizamudeen SM on Jan 11, 2011 7:09 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kiran,
1. How many rows are there in the table?
2. What is the value for the property Compatability Model in the table? It should be auto. (It is in Webdynpro JAVA)
3. wdContext.currentTableNodeElement().getName(); it will give you the current value on whichever row you have clicked.
And for check box
Place a new column and name it as Select. on that place CheckBox Ui. you need bind a boolean attribute for the check and it should inside the table node. on click action, write the code to check which element is selected by checking this attribute is true or not. Using that get the index of that element and process accordingly.
Try the following for WD ABAP.
Regards
Nizamudeen SM
Hi Kiran,
You can achive this by means of Parameter mapping for the link to action UI you are using, below are the steps
1. For the onAction method of the Link to Action UI add an input parameter selectedElement of type IWDNodeElement.
2. Add the below mentioned code in the wdDoModify() method, assuming "la_Link" is the Id of the Link to Action UI added in the table cell
if(firstTime){
IWDLinkToAction link = (IWDLinkToAction) view.getElement("la_Link");
link .mappingOfOnAction().addSourceMapping("nodeElement","selectedElement");
}
3. In the onAction method of the Link to Action UI use the below line of code to get the selected row, using which you can get the corresponding values
IPrivate<VeiwName>.I<TableNodeElement> element = (IPrivate<VeiwName>.I<TableNodeElement>) selectedElement;
Hope this will help.
Regards,
Vishweshwara P.K.M
Hey sorry, I did not see the subject line properly, this answer was for web Dynpro JAVA
Edited by: Vishweshwara P.K.M on Jan 12, 2011 6:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kiran,
romove the action asiigned to onLeadSelection and create LinkToAction UI element in Table cell editor and assign newly created action to LinkToAction UI element.
in that action first get the leadselection fo table by using getLeadselection() method.
get the values from that row based on lead selection and set to the container fields.
revert back if you any quaries.
Thanks & Regards,
Bhargava.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear All Thanks for ur replies.. I rewarded to all .. all r helpful answers.. but still i m not getting that..!!
@ Bhargava & Abhinav ,
Hi Bhargava & Abhinav ,
I did the same as u told. default 1st row is selected.. when i click on any link in table cell i am getting the first row values only..!!
Sry I didnt get that.. Can u pls provide one sample piece of code for that..!!
Thanks,
waiting for ur replies..
Regards
kiran
Hi Kiran,
it is very simple.
1. By defult first row will be select, if you don't want that use the following code in wdDoInint() method.
wdContext.node<NodeName>().setLeadselection(-1);
2. Place the LinkToAction UI element in Table cell editor and create the action for that.
3. In Action write the following code.
if for example in table LInk, EmpId, name and Empstatus columns are there.
IPrivateAPPlinktestView.ITableNode node = wdContext.nodeTable();
IPrivateAPPlinktestView.ITableElement ele;
if(node.getLeadSelection() != -1)
{
ele = node.getTableElementAt(node.getLeadSelection());
wdContext.currentFormElement().setEmplid(ele.getEmplid());
wdContext.currentFormElement().setName(ele.getName());
wdContext.currentFormElement().setEmpstatus(ele.getEmpstatus());
}
revert back if you have any quaies.
Thanks & Regards,
Bhargava.
Hi
If I understood you correct, you want to display certain rows on click of link to action instead of OnLeadSelection. I think this is possible and whatever code you have written, you cam write the same in onAction of Link. And dont write anything on onLeadSeclection.
Once you click on your link to action, by default onLeadSelection will be triggered and if there is no code, next action will be called which is your link to action.
We have tried the same approach and it worked for us.
Regards
Abhinav Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.