The following function can be called using the af:clientListener on any event
function showMenu(event){
var adfRichMenu = event.getSource();
adfRichMenu.getPeer().show(null,true);
}
The following function can be called using the af:clientListener on any event
function showMenu(event){
var adfRichMenu = event.getSource();
adfRichMenu.getPeer().show(null,true);
}
There are two types of development in ADF development using jdeveloper. ui-first approach and data-first approach.
ui-first approach – design the UI first and then the data
data-first approach – design the data first and then design the UI accordingly.
In the first approach, we are sure that its very hard to design a real-time web application without some data. For this purpose adf provides a placeholder datacontrol using which we can design the page accordingly. The placeholder datacontrol is a simulation of actual data control in realtime scenario and we have full options to design the page without the actual data using this.
To start with,
In the Application Navigator, right-click the project and choose New
In the New Gallery, expand Business Tier, select Data Controls and then Placeholder Data Control, and click OK
Enter the values for place holder name, Directory name, Description and click ok
Datacontrol.dcx, adfm.xml, placeHolder.xml file gets created
Now, right-click the created datacontrol in the panel and select ‘Create Placeholder data type‘
create the attributes and click ok
The created datacontrol is exposed in the panel like a normal datacontrol
The attributes that are exposed can be dragged and dropped to the page as usual
Following code will help you to scroll to a specific row in a af:table on page load.
//Code to scroll to a specific row this.tableBinding.setRowIndex(rowIndex); RowKeySet ps = this.tableBinding.getSelectedRowKeys(); ps.clear(); ps.add(this.tableBinding.getRowKey()); AdfFacesContext.getCurrentInstance().addPartialTarget(this.tableBinding);
Also set the displayRow=selected for the table
Whenever you create a deployment profile for the model project in ADF you will select the ADF Library type rather an ordinary library type (java jar type)
Both act as a library archive supporting jar and zip files
What is the difference then?
If you face issues like
java.lang.ClassNotFoundException: oracle.ecsf.util.contextFactory
then the solution is to add ECSF(Enterprise Core Solutions Framework) library to the project. There are two libraries that will make an impact
When a table has AutoHeightRows set to a value greater than 0 (eg 10),
clicking on the expand icon (+) in the row header does not display the
detailStamp area of the table
We have to set the AutoHeightRows to a value greater than 0 because if we
leave it as -1, a blank white area is displayed in the table
Do you know the fix for this?
simple fix was to add this attribute to the table:
rowDisclosureListener=#{FixAutoHeightRows.pprTable}
Here
FixAutoHeightRows is the bean bounded to the page
pprTable is the table binding or the binding for the component that is surrounding the table
Here is the tutorial on how to invoke a method before the page loads in ADF. Let’s assume that you have a method in the application module, which will have to be invoked before the page load.
For this, you have to expose this method as a client method using the client interface option for the application module. Click the edit icon and you will see your method listed in the Available list. Shuttle the method to Selected list and press ‘ok’.
After shuttling the method you will see that the method gets added to the client interface.
The method that we added will be exposed to the view layer through the application module data control. You have to refresh the data control to see your method.
Now to get the binding for our method we have to add a method action binding to the page definition file and select the method that is exposed in the data control. We select our method from the Operation and click ‘ok’.
After that we have to create an invokeAction in the Executables section to invoke the method action. We select our method from the list for the Binds and select Refresh as ‘always’.
now the method action binding and the invoke action is added to the page definition file.By default the invokeAction binding is added as a last executable. But we want to invoke the action on page load, so we move the invoke action to the first place to execute initially before any other executable. This can be done by dragging the invokeAction to the first place.
Now whenever you run your page you will see the control goes to the method automatically.
download the sample project from this location