HOW TO CRATE VO WITH BOOLEAN TRANSIENT ATTRIBUTE
OAViewDef viewdef=(OAViewDef)am.getOADBTransaction().createViewDef();
viewdef.addTransientAttrDef(
"TextDisable", //Attr name
"java.lang.Boolean", //Java type
null, //Default value
false, //Not null
AttributeDef.UPDATEABLE); //Updateable
OAViewObject vo=null;
ViewObject v=null;
if(am!=null){
v=am.findViewObject("xxBidFeeAmountVO1");
}
try{
if(v==null){
vo=(OAViewObject)amImpl.createViewObject("xxBidFeeAmountVO1",viewdef);
vo.setMaxFetchSize(0);
Row row = vo.createRow();
vo.insertRow(row);
Row row1=vo.first();
row1.setAttribute("TextDisable",Boolean.TRUE);
vo.executeQuery();
}
else
{
v.reset();
v.setMaxFetchSize(0);
Row row = v.createRow();
v.insertRow(row);
Row row1=v.first();
row1.setAttribute("TextDisable",Boolean.TRUE);
v.executeQuery();
}
}
catch(Exception e){
throw new OAException("firse",OAException.ERROR);
}
No comments:
Post a Comment