NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

ICEFaces + Data Provider + Netbeans 6.5 + Mysql + JSF

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
Link



Joined: 01 Nov 2008
Posts: 2

PostPosted: Sat Dec 20, 2008 6:02 pm    Post subject: ICEFaces + Data Provider + Netbeans 6.5 + Mysql + JSF Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo