java - How to remove a row after adding it to a view object with createRow() -


I have a visual object and I to make such a line:

  ContactsVORowImpl Person = (contact VORowImpl) getContactsVO (). CreateRow ();   

Then I leaves the assigned some properties went lines formed, which overlooked the others (intentionally):

  person.setFirstname ( "Firstname"); //person.setLastname (""); person.validate ();   

I get a validation error complaint because last name is empty .

Then I commit without any entry , line in the visual object:

  getDBTransaction (). Commit ();   

Here I Last Name The following exception to be null:

  exception class: class oracle.jbo.AttrValException, Message : JBO-27014: Attribution Last Name is required in ContactOo. Oracle.jbo.AttrValException: JBO-27014: contact attribute AO last name is required oracle.jbo.server.JboMandatoryAttributesValidator.validate (JboMandatoryAttributesValidator.java:224) oracle.jbo.server.EntityDefImpl.validate (EntityDefImpl.java:3200) on oracle.jbo.server.EntityCache.validate (on EntityCache.java:3601) oracle.jbo.server.EntityImpl.validateEntity (EntityImpl.java:2361) oracle.jbo.server.EntityImpl.validate (EntityImpl.java:2540 ) Oracle.jbo.server.DBTransactionImpl.validate at (at DBTransactionImpl.java: 4540) oracle.jbo.server.DBTransactionImpl.commitInternal (DBTransactionImpl.java:2035) at oracle.jbo.server.DBTransactionImpl.commit (DBTransactionImpl.java : 2378) on   
  1. How could this happen, because I did not include the row?
  2. How can I work around this?

    I'm actually committed to a group; I am finding faulty lines and I am not involved in the visual object to avoid commitment. Yet it tries to commit them; Why?

    Documentation says:

    Creates a new view line. The new line is not kept in the unit cache unless its primary key is initialized. It is inserted into the database when the change is posted to the database and the transaction is committed.

    The last part it says that it was inserted into the database, so

    Workaround: removeCurrentRow Try calling, but before checking whether the current row is the line you just created. Not tested

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -