Refresh region with poll

If you have a region in your fragment, in the polllistener method, you can refresh a región with refresh method and then you make a partialtarget in the component that envolves a region

yourBindingregion.refresh(FacesContext.getCurrentInstance());
AdfFacesContext.getCurrentInstance().addPartialTarget(getPg());

But remember put Refresh=”ifNeeded” in the taskFlow of this region

Three ADF´s versions…which choose?

Now we have a three versions of ADF product.

Here I write some keys so that you may make a better choice

  • R1: 11.1.1.7 the ADF with SOA ,BI and Webcenter complements
  • R2: 11.1.2.4 the version with JSF 2 and ADF improvements and ADF Mobile
  • 12c: 12.1.2.0.0 the version support for an corresponding new Fusion Middleware release 12.1.2 with cloud support

And now if you have a JDeveloper version, ¿which is my version of weblogic?

JDeveloper 12c is out

The new version of JDeveloper is now out. The oficial list of features is here

Some highlighted features:

  • Java EE 6 Support
  • HTML5, MathML and CSS3 Support:
  • REST/WADL Support
  • JSF 2.0 Support
  • New ADF Components
  • Maven and Git support
  • Matisse Swing Support

Extra Links:

Parent Action and refresh components

Sometimes we need refresh or access components from region but the problem is that, these components are binding in a bean of master page.

Typical example is when you have a paneltab where each tab is a region  and you need access acomponent for master page.

In this case you can make use of Parent Action, for invoke a parent action activity.

The schema is showed in next diagram:

parentAction

Another way is get a instance of master bean from region bean.


ExternalContext exctxt = FacesContext.getCurrentInstance().getExternalContext();

MasterBean mBean = (MasterBean) exctxt.getRequestMap().get("MasterBean");

Oficial Doc: Using Parent Action Activities

Creating Keyboard shortcuts in ADF

For default ADF Faces provides a accelerator for page level components. But this is not customized.

The menu components like commandMenuItem have the accelerator attribute (Ctrl+YourKey).

Another possibility is the accessKey attribute. This attribute moves the focus to the components and in the case of button or links executes the action.

The problem is that the interpretation of accessKey depends of browser.

For example:

  • Firefox interprets the acceskey like Alt+Shift+yourAcKey.
  • Explorer Alt+yourAcKey.

Firefox always sets focus and executes the action in all the components but IE in some components like in the commandToolbarButton only sets a focus.

Another way is create your own shortcuts through JavaScript functions.

Import/export your external tools in JDeveloper.

Currently in JDeveloper we don´t have a tool for import/export our external tools.
But if you have a custom external tools and you wish export to another JDeveloper it´s easy.
The IDE save the configuration´s tools in the next path

  • C:\Users\[your user]\AppData\Roaming\JDeveloper\[system11.1.1.x..xx.xx.xx]\o.jdeveloper

In the file product-preferences.xml.

Only you should copy this file in the folder o.jdeveloper of the installation where you wish import the external tools.

Clean criteria and Results in a af:query

Suppose we have two fragments, view1 and view2.

In view1 we have a button for go to the view2 and there we have a af:query with Table (the results).

If we need clean the criteria and the results when enter again in view2, one way is to insert a method call between the views and reset the criteria applied programmatically

cleanCriteria

public void reset(String myCriteria){
 //this code is in a ViewImpl context
 //myCriteria is the criteria that  use in af:query
 ViewCriteria _vcriteria = getViewCriteria(myCriteria);
 resetCriteria(_vcriteria);
 executeQuery();
}

FootNotes: Based on a question of the OTN Forum