craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Events/Actions Post New Topic   Post A Reply
beforeInsert printer friendly version
next newest post | next oldest post
Author Messages
JDeiviz
Unregistered
Edit or delete this message Reply w/Quote
Posted Tuesday, March 15, 2005 @ 06:28:08  

I have a three tier architecture, i want create new empty row after insert record in EJB

public boolean beforeInsert(int row){
insert row.....
DBTable.insertEmptyRecord();
return false;
}

Insert record and create empty row correctly but if I edit and leave empty row the DBTable not call beforeInsert another time. Thanks

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, March 15, 2005 @ 21:16:10  

QuickTable needs to know when the user has entered enough information in the record, so that information can be inserted into database/ejb. Currently when the user moves to a different record than the currently added new record, quicktable inserts the new record into database. Before it inserts into database it calls the beforeInsert method.

In your case may be the user has not moved into another row, that is why beforeInsert() is not called. If you really want to insert the row into database once the user moves to a different cell in the same row, then you need to set dbTable.setDatabaseUpdateMode(DBTable.UPDATE_DATABASE_ON_CELL_EXIT )

Or if you know exactly when the record should be inserted, just call the dbTable.save() method, this will update any pending changes into database. You can also provide a save button and call the save() method or when the user exits the application you can call save() so that any pending updates will be updated into database.

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios