Thursday 7 December 2017

Set the Initial Focus on a component in a Page

In ADF, set the initialFocusId property of the af:document to set the focus on a Component on initial load  when the full page renders.

Note that if you are setting the initialFocusId to a component that is not normally available when rendered on the client, then you will also need to set the clientComponent attribute on that component to 'true'. Also, be aware that initialFocusId will be ignored when accessibility-mode is set to "screenReader"

You have to identify the ID of the component and set it for initialFocusId
Suggestion: Identifiers are relative to the component, and must account for NamingContainers. You can use a single colon to start the search from the root, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container and begin the search from there, ":::" will pop out of two naming containers and begin the search from there, etc.


<f:view>
  <af:document initialFocusId="<ID with relative path>">
   <af:form> ... </af:form>
  </af:document>
</f:view>

To identify the relative path of a component you can use developer toolbar in chorme and Firebug in Firefox (Right click on the component and select inspect element).

Ref: https://docs.oracle.com/html/E12419_09/tagdoc/af_document.html

Wednesday 6 December 2017

Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'row' resolved to null


When we are working with table there are some cases we face the following error:

by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'row' resolved to null


As per my findings, this issue will occur when we are working with LOVs in the table or with the QBE.

Working with LOVs:
   Is primary is part of the LOV then you can face this issue. To fix this issue then the suggested solution is to create surrogate key.

QBE:
   If you face this issue when you try to enable QBE, then make sure that you are not referring to the row in filter facets in the table columns.

By default QBE shows input textbox for all the columns, if you want to show different component like date component or LOV then Filter facets are used to render the different component when QBE is enabled.

  <f:facet name="filter">
     <af:selectOneChoice label="Access Mode" id="soc2" value="#{vs.filterCriteria.AccessMode}" simple="true">
         <af:selectItem label="#{null}" id="si4" value="#{null}"/>
         <af:selectItem label="Public" id="si5" value="1"/>
         <af:selectItem label="Private" id="si6" value="0"/>
     </af:selectOneChoice>
  </f:facet>

If you facing 'Target Unreachable, identifier 'row' resolved to null' issue with QBE then you have to make sure that you are referring to row attribute in the filter facet.
Ex:
<af:selectOneChoice label="Access Mode" id="soc2" value="#{row.bindings.pfscopeBean.AccessMode}" simple="true">

It should refer with the varstatus property like
 <af:selectOneChoice label="Access Mode" id="soc2" value="#{vs.filterCriteria.AccessMode}" simple="true">


Note:
Table definition in the jsff will be like:
<af:table value="#{bindings.myVO1.collectionModel}"
     var="row"
     rows="#{bindings.myVO1.rangeSize}"
     varstatus="vs"
.......
</af:table>

If above suggestion will not work try is by setting changeEventPolisy=ppr for the detail table iterator and the tree binding in the pageDef file

Friday 17 June 2016

Error on Deploying BPEL: java.lang.NoClassDefFoundError: com/collaxa/cube/util/JavaHelper

The following error occurred while deploying the BPEL composite:


[05:11:07 PM] HTTP error code returned [500]
[05:11:07 PM] Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: Fulfillment to service engine: implementation.bpel, for composite: POProcessing: ORABPEL-05250

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "C:\Oracle\Middleware\user_projects\domains\soa_domain\servers\soa_server1\dc\soa_4f56ee57-8dc4-401a-8267-3b8fed1bb15f"; the exception reported is: java.lang.NoClassDefFoundError: com/collaxa/cube/util/JavaHelper

This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
.
 
[05:11:07 PM] Check server log for more details.
[05:11:07 PM] Error deploying archive sca_POProcessing_rev1.0.jar to partition "default" on server soa_server1 
[05:11:07 PM] ####  Deployment incomplete.  ####
[05:11:07 PM] Error deploying archive file:/C:/JDeveloper/mywork/POApplication/POProcessing/deploy/sca_POProcessing_rev1.0.jar 
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

Sol: Trying to get the solution for this issue.