NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Link
Joined: 01 Nov 2008 Posts: 2
|
Posted: Sat Dec 20, 2008 6:02 pm Post subject: ICEFaces + Data Provider + Netbeans 6.5 + Mysql + JSF |
|
|
Hello, everyone,
I created a page of CRUD of registration of federal units using the components of ICEFaces in NetBeans.
On this page, before inserting a new record in the database, I do a search this database to verify that the federative unit has been registered.
For example: in the database, there is the symbol of the state of Sao Paulo (SP) already registered, so if the user was it register again the system should give an error message telling you that this symbol already exists.
The problem I'm finding is that this search is not working. See the example below:
| Code: |
try {
// Take the value typed by the user in component inputText
getSessionBean1().getTbufRowSet2().setObject(1, inputText1.getText());
// Restart the Data Provider data erasing earlier cache
tbufDataProvider2.refresh();
if (tbufDataProvider2.cursorFirst()){
error("Records found in the database! " + tbufDataProvider2.getValue("tbuf.abrevuf"));
} else {
info("Record not found!!!" + inputText1.getValue() + " ou " + inputText1.getText());
}
} catch (Exception e) {
tbufDataProvider.revertChanges();
error("An error occurred! " + e);
e.printStackTrace();
}
|
I have this question or give me a suggestion?
An embrace |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|