We have a couple (about a hundred) of tables with the same structure (Code, Description, Create Date, Update Date).    So I wanted to do something simple so that I did not have to create all these screens   1) EO    I created the EO based on one of the tables I had that had the above columns.     I then Added a transient attribute called table name to my EO based on a groovy expression. (the expression needs to change as I am reading web tier stuff from the model layer but I will fix this later)      I then generated a java class for my EO.      And added the following overriden method to my newly created java class.    protected StringBuffer buildDMLStatement(int i,  AttributeDefImpl[] attributeDefImpl,    AttributeDefImpl[] attributeDefImpl2, AttributeDefImpl[] attributeDefImpl3, boolean b) {   StringBuffer statement = super.buildDMLStatement(    i, attributeDefImpl, attributeDefImpl2, attributeDefImpl3, b);  return new StringBuffer(StringUtils.replace(statement.to...
 
 
Thanks, man!
ReplyDelete