http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
Monday, September 22, 2014
Monday, September 15, 2014
Tuesday, September 9, 2014
ADF sample Applications
Please refer to this for sample adf applications:-
https://java.net/projects/smuenchadf/pages/ADFSamples
https://java.net/projects/smuenchadf/pages/ADFSamples
Wednesday, August 13, 2014
Problem not fetching all the records when executing a View Object in ADF
Execute the View Object :
this.getXyzEOView( ).getViewObject(). setQueryMode(ViewObjectImpl. QUERY_MODE_SCAN_DATABASE_ TABLES|ViewObjectImpl.QUERY_ MODE_SCAN_ENTITY_ROWS| ViewObjectImpl.QUERY_MODE_ SCAN_UNPOSTED_ENTITY_ROWS| ViewObjectImpl.QUERY_MODE_ SCAN_VIEW_ROWS);
this.getXyzEOView(
Thursday, July 17, 2014
Monday, June 16, 2014
ADF Best Practices
ADF Best Practices:
1.
Avoid
Web services -- performance issues.
2.
Avoid
JDBC Raw calls – framework already takes care of that
3.
Resource
bundles – Error messages, tooltips and labels
4.
UI
Properties files – File of tokens and matching strings
5.
Clean
check out – everytime when starting a development
6.
One
to Many mapping of EO s and VO s – Using joins in VO s is preferable
7.
Use
ROVO when possible – Helps performance by bypassing the entity cache
8.
Define
VO s at design time rather than at run time – VO s created at run time will
incur an overhead in the performance
9.
Use
named bind variables in queries to filter the data based on a number of
parameters – Can use executeWithParams as a search form
10. Performance – Define how many and what
matter the rows are being fetched
Optimizer hints
a.
While
Developing : ‘jbo.ampool.doampooling’ parameter to ‘false’
As you exit out your
application while testing, re-runs of the application wont be locked by the
application you just exited.
b.
While
Testing : ‘jbo.dofailover’ parameter to ‘false’
Thus disabling application
fail over. This will allow application with out having to save the failover
information.
c.
If
the application uses the same database
user to access application data ensure that you are not running with dynamic
JDBC credentials. Use ‘jbo.ampool.dynamicjdbccredentials’
set to ‘false’
12.
Java Server Faces:
Do not mix JSFs with any other raw HTML tables for layout.
13.
Backing Beans:
The backing bean is a one-stop-shop for the code associated with a web
page and generally speaking it is good practice, if you require code to support a page, to have
one backing bean per page.
14.
Managed Beans:
If it is required to store the state information to be held for the user
interface then this should be done through managed beans. ADF Best Practices:
1.
Avoid
Web services -- performance issues.
2.
Avoid
JDBC Raw calls – framework already takes care of that
3.
Resource
bundles – Error messages, tooltips and labels
4.
UI
Properties files – File of tokens and matching strings
5.
Clean
check out – everytime when starting a development
6.
One
to Many mapping of EO s and VO s – Using joins in VO s is preferable
7.
Use
ROVO when possible – Helps performance by bypassing the entity cache
8.
Define
VO s at design time rather than at run time – VO s created at run time will
incur an overhead in the performance
9.
Use
named bind variables in queries to filter the data based on a number of
parameters – Can use executeWithParams as a search form
10. Performance – Define how many and what
matter the rows are being fetched
Optimizer hints
Define the query plan the DB will use
when executing a query
11. Application Module Configuration
setting:

a.
While
Developing : ‘jbo.ampool.doampooling’ parameter to ‘false’
As you exit out your
application while testing, re-runs of the application wont be locked by the
application you just exited.
b.
While
Testing : ‘jbo.dofailover’ parameter to ‘false’
Thus disabling application
fail over. This will allow application with out having to save the failover
information.
c.
If
the application uses the same database
user to access application data ensure that you are not running with dynamic
JDBC credentials. Use ‘jbo.ampool.dynamicjdbccredentials’
set to ‘false’
12.
Java Server Faces:
Do not mix JSFs with any other raw HTML tables for layout.
13.
Backing Beans:
The backing bean is a one-stop-shop for the code associated with a web
page and generally speaking it is good practice, if you require code to support a page, to have
one backing bean per page.
14.
Managed Beans:
If it is required to store the state information to be held for the user
interface then this should be done through managed beans.
Thursday, May 15, 2014
Refresh Page in ADF
The following code refreshes the whole page
FacesContext fctx = FacesContext.getCurrentInstance();
String refreshpage = fctx.getViewRoot().getViewId();ViewHandler ViewH = fctx.getApplication().getViewHandler();
UIViewRoot UIV = ViewH.createView(fctx, refreshpage);
UIV.setViewId(refreshpage);
fctx.setViewRoot(UIV);
To refresh a specific component :
AdfFacesContext.getCurrentInstance().addPartialTarget(UIComponent);
Subscribe to:
Posts (Atom)

