Wednesday, February 9, 2011

ADF project cancelled

Looks like our ADF project is getting canned - there is a possibliliy of another starting up or else look out for some more orientated java posts soon.

Ok maybe not looks like we have some more work to do and more clients!

Wednesday, February 2, 2011


Ok so I have upgraded to the new version of JDev today, all seems good.
Let the fun and games commence. Will update this post once I have anything I spot.

Hmmn Gridlink Datasource and MultiData Source lots of reading up to do.
New Entitlement Grants in jazn look good.

Our applications seems to be working as before...

Spoke to soon :
1) java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: defaultSelection
A) Dont map a bind variable with a default to a transient attribute in VO.

2) No User found matching the criteria
A) Think this is to do with the fact that our provider is the first in the list. Will investigate later as it has no impact.

3) One Screen is now vastly slower.
A) Make sure your tuning parameters are set this fixed it for me.

4) When trying to run one of our sub projects stand alone: ADFC-0619: Authorization check failed: 'oracle.jbo.uicli.binding.JUFormDef@192172f' 'VIEW'.
A) ???

Tuesday, February 1, 2011

ADF insert value into verbatim tag

<f:verbatim><input id="editButtonId" type="hidden" value="${viewScope.formBean.value}"/><f:verbatim>

Auto Focus in ADF : Revisit

Auto focus on the first or name field of a jsff is difficult if it is loaded dynamically.

Here is one solution:

1) In your page or template add the following non visible text fields near the end of your page(these will set the client id of your field and execute some javascript):

<af:inputText clientComponent="true" id="hit7" value="#{formBean.focusId}" visible="false"/>

<inputText clientComponent="true" id="hit8" value="#{formBean.focusScript}" visible="false"/>

2) Backing bean (MUST use view scope):
//member variables
 private boolean mustExecuteAutoFocus = false;
 private String clientFocusId = null;
 //Constructor - this will be called when the taskflow id changes in the region
 public FormBean(){
  mustExecuteAutoFocus = true;
 public String getFocusId(){
  //here you can use a bound component or find a component in the view root by id etc to get your id or just hard code it
  UIComponent comp = findFirstInputTextComponent();
  if (comp == null){
   return null;
  return getClientFocusId();

public String getClientFocusId(){
 return clientFocusId;

public void setClientFocusId(String clientFocusId){
 this.clientFocusId = clientFocusId;

public String getAutoFocusClientScript(){
 if (getClientFocusId() != null && mustExecuteAutoFocus){
  executeScript("autoFocus('" + getClientFocusId() + "');");
  mustExecuteAutoFocus = false;
 return "";

3) js
function focus(focusId) {
 var f = document.getElementById(focusId + '::content'); 
 if(f == null) {
  f = document.getElementById(focusId);
 if (f != null) {
  setTimeout("focusElement('" + + "');", 100);

function focusElement(elementId) {
    var c = document.getElementById(elementId);
    if (c != null) {