แสดงบทความที่มีป้ายกำกับ #OAF แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ #OAF แสดงบทความทั้งหมด

วันพุธที่ 7 มกราคม พ.ศ. 2558

OAF: วิธีการใส่ Format ให้กลับจำนวนเงิน

เจอปัญหาในการใส่ Format ให้กับจำนวนเงิน สำหรับ Total Row ใน OAAdvancedTable


OAAdvancedTable
Id: showDetailTb

Id: column1
Total Value: True

Id: TrxAmount
View Attribute: TrxAmount

ถึงเราจะใส่ Format ให้กับ OAMessagedStyledTextBean id TrxAmount
แต่จำนวน Total ก็ยังไม่อยู่ในรูป Format
หลังจากลองผิดลองถูก เข้าไป set format ในเกือบทุก objects ที่อยู่ภายใต้ OAAdvancedTable 
ก็ได้เข้าใจว่าถ้าต้องการให้เลขใน TotalRow อยู่ในรูปแบบที่จัด Format แล้วเราต้องไปตั้งค่าที่...

วันพฤหัสบดีที่ 17 มกราคม พ.ศ. 2556

Populate current date use getCurrentDBDate()

SimpleAMImpl am = (SimpleAMImpl) pageContext.getApplicationModule(webBean);
SimpleDateFormat format = new SimpleDateFormat(“yyyy-MM-dd hh:mm:ss.S”);
SimpleDateFormat formatDate = new SimpleDateFormat(“yyyy-MM-dd hh:mm:ss”);
oracle.jbo.domain.Date convertDate = applicationModule.getOADBTransaction().getCurrentDBDate();
java.util.Date date = format.parse(convertDate.toString());
String convStr = formatDate.format(date);
System.out.println(“Date from database:  ”+convertDate.toString());
System.out.println(“java.util.Date: “+date.toString());
System.out.println(“String date: “+convStr);
ขอแปะ code ไว้ก่อนแล้วจะมาอธิบายนะครับ