I am developing a web application[JSP, Struts, ADF BC].
I want to collect the last Primary Key of myEntityObject, increment
it, and insert it.
Till now my code in the entity object is:
protected void create(AttributeList AttributeList) {
super.create(AttributeList);
setAttribute(1,"My Desired Code");
}
I have added a function in myApplicationModule.
public String getLastId(){
String value;
value = this.getMyView1().last().getAttribute(1).toString() +1 ;
return value;
}
I don't know where to call this function in order to put my generated
code into the setAttribute(1,"My Desired Code");
???Where can I call this function so that not encounter to a null object.