Friday, 8 February 2013

Implementation of Instruction Help for Input Fields

Instruction Help is nothing but showing detail description about particular field. It shows as a speech bubble dialog against the UI field when the focus is inside. It is helpful to the end user for filling the Input fields. Follow the below steps for implementations,

  • Create an Application and View Controller project.
  • Open the ADF META-INF folder under the Application Resources and create a adf-settings.xml.
  • After creates a adf-settings need to include the help-provider-class and property. The help provider is oracle.adf.view.rich.help.ResourceBundleHelpProvider and the property is 'baseName'. It is in-build property of ResourceBundleHelpProvider and value is Resource Bundle name along with package.

  • The Key of the resource bundle entry should be suffix with '_INSTRUCTIONS'.

  • Editable UI Component of page or fragment should have the property of 'helpTopicId' and value is key of the resource bundle elements. Help Topic Id value should not includes '_INSTRUCTIONS'.


In addition, if you want to access the Instruction Help through EL expression then use #{adfFacesContext.helpProvider[Help Topic Id].instructions}.



For more details check with sample.

[Runs with Oracle JDeveloper 11g R2 Update3]

How to run this sample?
Run using the Help.jsf and HelpEL.jsf to check the Implementation of Instruction Help and how EL is used to access the Instruction Help.

Thursday, 7 February 2013

Enabling the Keyboard Hot Keys(Ctrl+ Any Key) in an Application


Hot Keys are used in most of the application for reduce the no. of navigation and short-cut activity to end user. Hot keys are very common and used all our day today applications. We will achieve same in ADF by using the following steps.

Need to register the Hot Keys on the Page Load by using the Java script.In this first, need to find the Key Stroke code by using the API of AdfKeyStroke.getKeyStrokeFromMarshalledString() and second need to register Key Stroke code by using the API of AdfRichUIPeer.registerKeyStroke().



RegisterKeyStroke contains the method of 'callBack()' and it will call whenever register key is pressed from the Key Board. From callBack method has a logic to trigger the respective button actions.  


For more details check with sample.

[Runs with Oracle JDeveloper 11g R2 Update3]

How to run this sample?
Run using the HotKeys.jsf and check the behaviors of Hot Key Actions. If you pressed ctrl+S then it triggers Save Action and ctrl+R then it triggers Reset Action.