Total Pageviews

Wednesday, June 1, 2011

Populate Current Date and Time in OAF

OAApplicationModule am = pageContext.getApplicationModule(webBean);
SimpleDateFormat f = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
String dateString = am.getOADBTransaction().getCurrentDBDate().toString();

java.sql.Date sqlDate= new Date(f.parse(dateString).getTime());

OAMessageDateFieldBean dateField =(OAMessageDateFieldBean)webBean.findIndexedChildRecursive("currentDate");

dateField.setValue(pageContext,sqlDate);

1 comment:

  1. thank you , this is work. Bu I want to update selected row.

    Vorow.xxdate ;

    in table list

    LogVOImpl vo = getLogVO1();
    LogVORowImpl vorow = (LogVORowImpl)vo.getCurrentRow();

    I want to this

    vorow.setapprovedDate(currentDate) like this.

    thank you.

    ReplyDelete