본문 바로가기

OAF/잉여 쏘스17

VO All Row Copy method /** * Copy rows from one view object to another * @param sourceVO * @param destVO * @author Sudhakar Mani */ public static void copyRows(ViewObjectImpl sourceVO, ViewObjectImpl destVO) { if (sourceVO == null || destVO == null) { return; } AttributeDef[] attrDefs = sourceVO.getAttributeDefs(); int attrCount = (attrDefs == null) ? 0 : attrDefs.length; if (attrCount == 0) { return; } // Create a ro.. 2014. 12. 14.
자바스크립트 Yes/No 팝업창 띄우기 //1.-- processRequest coding-- StringBuffer javaScript = new StringBuffer(200); javaScript.append("function deleteConfirm() { "); javaScript.append("if( !confirm('Do you want to delete ?') ) { "); javaScript.append(" return ; "); javaScript.append("} else { "); javaScript.append(" submitForm('DefaultFormName' ,0,{'event':'deleteConfirm'});"); javaScript.append("}"); javaScript.append("}"); pageC.. 2014. 12. 14.
VO에서 initQuery시 디폴트로 감싸는 것을 해제 vo.setNestedSelectForFullSql(false); 2014. 12. 14.
Programmatic View Object(Dynamic VO) 1. String sql = "select 'A' as tt from dual"; ViewObject createdVO = null; createdVO = transaction.createViewObjectFromQueryStmt(sql); createdVO.executeQuery(); Row row = createdVO.first(); row.getAttribute("TT") // or row.getAttribute(0); 2. ViewObject queryVo = am.createViewObjectFromQueryStmt("", "select empno, enmae, salary from emp"); or String entity = "Employee.Emp"; String selectClause =.. 2014. 12. 14.
VO에서의 바인딩 스타일.. VO의 Sql Statement 메뉴 에서 Binding Style이 12에서는 Default로 Oracle Named 이고 11에서는 Oracle Positional 로 되어 있었습니다.. 두개의 차이는 기본적으로.. Oracle Named는 쿼리에 적혀있는 바인딩 된 번호대로 매핑이 되고. initQuery도 이에 맞게 해주어야 됩니다, Oracle Positional는 쿼리에 바인딩된 순서를 무시하고 스스로 바인딩 값을 새로 매깁니다.. 또하나.. 바인딩이 Oracle Named 이면 CVS export 버튼이 제대로 실행되지 않습니다.. 2014. 12. 14.
EO에서 PK값 체크 하는 로직. Tutorial 소스 중에서.. public void setEmployeeId(Number value) { OADBTransaction transaction = getOADBTransaction(); Object[] employeeKey = {value}; EntityDefImpl empDefinition = EmployeeEOImpl.getDefinitionObject(); EmployeeEOImpl employee = (EmployeeEOImpl)empDefinition.findByPrimaryKey(transaction, new Key(employeeKey)); if (employee != null) { //throw exception.. } setAttributeInternal(EMPLOYEEID.. 2014. 12. 14.