Showing posts with label 11g. Show all posts
Showing posts with label 11g. Show all posts

Saturday, 2 July 2016

How to reset af:table pagination to first page in Oracle ADF

This blog we will see how to reset the af:table pagination to predefine page.
Sometimes due to MDS the last visited page number will persist. we need to reset the old page number and set the new page number.
You can use the below code for rest the pagination 


DCIteratorBinding dcIter = (DCIteratorBinding)(BindingContext.getCurrent().getCurrentBindingsEntry()).get("your iterrator Name");
int taskIndex = 1; // It will navigate to the page where 1st element exist.
int range = dcIter.getRangeSize();
int oldStart = dcIter.getRangeStart();
int newStart = taskIndex-(taskIndex % range);
dcIter.getRowSetIterator().setRangeStart(newStart);
dcIter.setRangeStart(newStart);
RangeChangeEvent event = new RangeChangeEvent(tableBinding, oldStart, oldStart+range, newStart, newStart+range);
tableBinding.broadcast(event);
dcIter.getRowSetIterator().setCurrentRowAtRangeIndex(taskIndex % range);
dcIter.setCurrentRowIndexInRange(taskIndex % range);
AdfFacesContext.getCurrentInstance().addPartialTarget(tableBinding);

Thanks...

Sunday, 26 June 2016

How to fix Java.lang.OutOfMemory exception in jDeveloper

This blog we will see how to avoid OutOfMemory exception in jDeveloper.
While working with Oracle jDeveloper we are getting the OutOfMemory exception, to fix this proble we need to edit the below files.
1. Jdev.conf
2. Ide.conf
3. setDomainEnv.cmd (for windows OS).
Jdev.conf file you can get in D:\Oracle\Middleware\jdeveloper\jdev\bin (this file path will change as per your jdeveloper installation directory).

These above variables you can change as per your system memory.
Ide.conf file you can get D:\Oracle\Middleware\jdeveloper\ide\bin (this file path will change as per your jdeveloper installation directory).

These above variables you can change as per your system memory.
setDomainEnv.cmd file you can get C:\Documents and Settings\Prabhat\Application Data\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin  (this file path will change as per your jdeveloper domain directory)




These above variables you can change as per your system memory and as per the java.

Thanks..

Sunday, 7 December 2014

Use of PanelCollection in Oracle ADF

This blog we will see use of af:panelcollection in Oracle ADF. 
This example table is surrounded with a panel collection component like the below screen.
Now run your page and page will looks like the below screen.
On runtime, af:panelCollection will be rendered with View menu item and other features. User can add or remove the columns from the table at run time.
User can sort the columns, click on View-->Sort-->Advanced

You can select the column name and sorting order like the below screen

User can rearrange the columns, click on View-->Reorder Columns… then the below screen will display and can arrange the columns.
Thanks..