on 12-20-2005 9:38 AM
hello everybody,
i had created one view with some elements to insert into the database. when i click on SAVE button, it is inserting. but the data in the view is still remaining.
i wanted to clear those fields after saving..
how to do that.
hi sunil.
u can clear the fields in the view.
after saving into the data base write the following code.
if u want to clear all the fields in the view(ie total context)
wdcontext.invalidate();
in u want to clear one particular node write,
wdcontext.node<urnode>.invalidate();
bye.
brahmanandam ausali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sunil
on the on action save button
after saving it to the database
give the following code
set the corresponding attributes to null.
wdcontext.currentcontextelement.set<attribute name>(null);
regards
saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
in the onaction of ur save button give the code
wdContext.currentcontextelement.set<attributename>("");
Regards
Rathna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
just use this code in ur save button action handler , this will clear the field after entered in to the database and will ready for the next set of data.
String password=wdContext.currentContextElement().getpwd();
try{
InitialContext ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup("jdbc/SAPJ2EDB");
Connection con=ds.getConnection();
con.setAutoCommit(false);
Statement stmt=con.createStatement();
int retIns = stmt.executeUpdate("insert into TMP_NEWUSERDETAIL(PASSWORD) values("password")");
con.commit();
con.setAutoCommit(true);
wdContext.currentContextElement().setpwd(null);
}
or use a seperate button to clear the field.
wdContext.currentContextElement().set<Attributename>(null);
Regards
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.