Tuesday, September 30, 2014

Dynamic Form Iterator

Great resources to create dynamic form iterator
http://andrejusb.blogspot.com/2013/03/adf-generator-for-dynamic-adf-bc-and.html

Refresh issue need to pay attention to when creating dynamic form specially when rebuilding the form on the same page, execute this before invoking the method that will recreate you dynamic VO.

https://blogs.oracle.com/groundside/entry/refresh_problems_using_adaptive_bindings

Thursday, September 18, 2014

Oracle BI set User Identifier before running report

You can set a pre process property to execute a function at database level before running some set of queries. This is can be accomplished at report DataModel layer or before BI server connects to database in JNDI pre process property and post process property.


set_pre_process_username(:xdo_user_name,'AM START','BI')

set_post_process_username(:xdo_user_name,'AM FINISH','BI')

in the example above I am passing the logged in user in BI to the database to accomplish some kind of database row filtering.

A java usage (BI publicReportService):

You can impersonate the logged\-in user in your Java application by using the impersonate and runReportInSession methods.

String sid =reportService.impersonate(biUserName, biPass, loggedInUser);
repRes = reportService.runReportInSession(repReq, sid);

Monday, September 15, 2014

Clear TreeTable or Table selectedRowKeys from MDS

table.getSelectedRowKeys().clear();
RowKeySetAttributeChange rks =
    new RowKeySetAttributeChange(table.getClientId(FacesContext.getCurrentInstance()), "selectedRowKeys",new RowKeySetTreeImpl());
            RequestContext.getCurrentInstance().getChangeManager().addComponentChange(FacesContext.getCurrentInstance(), table, rks);