on 08-17-2005 8:48 AM
hi all,
I have table with context attributes name,id ,dateofcreation,stauts.
I have to retrieve the selected row in table I can able to delete particular selected row like this
int i = wdContext.nodeStatus().getLeadSelection();
wdContext.nodeStatus().removeElement(wdContext.nodeStatus().getElementAt(i));
But I have to retrive the values form the i th row of tablenode and set that values means getname(),getId(),getdateofcreation(),getstatus() to some javabean class to delete from db also.
please help
Hi,
You can remove the selected row as follows
wdContext.nodeStatus().removeElement(wdContext.currentStatusElement());
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
I have the code like this
int i = wdContext.nodeStatus().getLeadSelection();
wdContext.nodeStatus().removeElement(wdContext.nodeStatus().getElementAt(i));
String application =wdContext.currentStatusElement().getApplication();
try{
mdao.deleteMobileApplication(application);
}catch(Exception e)
{e.printStackTrace();
}
In Status table application is the primarykey I can able to delete from the table and database also but it is not deleting selected row from db. how to get the selected row values like getApplication() from table so then I pass it to db.
please help
Hi,
The value selected should be removed from the node and from the DB .Is it ?
If so ! The first part is done by the remove element you have mentioned.
Assuming you are using the id as the primary key ,
use a delete query to delete it .Pass this to a bean method and use this inside it !
Where is the problem ! Does it help ?
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
like this below code If I select row in a table it is picking above the row of selected row but not the selected row value of getApplication().
String application =wdContext.currentStatusElement().getApplication();
if I write code
int i = wdContext.nodeStatus().getLeadSelection();
form above statement how i can i select the getApplication() vlaue.
please help.
Hi,
Whatever is selected will be the current element.
If the attribute application is inside a node specify
wdContext.nodeStatus().currentStatusElemetn().getApplication();
int i = wdContext.nodeStatus().getLeadSelection();
will give the number of the row which is selected
Generically
you can use wdContext.nodeStatus().getStatusElementAt(i).getApplication();
Regards
Bharathwaj
Regards
Bharathwaj
User | Count |
---|---|
81 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.