Posts

Showing posts from March, 2011

Open wikipedia in a modal popup.

Image
This post was more or less inspired by the  noteWindow  example on Oracles tag demo site. When hovering the highlighted text in this example the user gets extra information about the subject. I wanted to give the end user the opportunity to get even more information, for instance by invoking a wikipedia page about the subject. The catch here is that I wanted this information to be shown in a modal popup, and one that is not prohibited by popup blockers. Luckily ADF 11g provides javascript popups that can also be made modal, so the user has to close the popup before returning to the application. This post describes how I used an  in a  to open the correct wikipedia in a modal popup. Step 1: Create the plain text that invokes the noteWindow. This is taken directly from the mentioned Oracle example. Vultures are scavenging birds, feeding mostly on the carcasses of dead animals. Vultures are found in every continent except

How to launch LOV and Date dialogs using the keyboard

How to launch LOV and Date dialogs using the keyboard By frank.nimphius on February 26, 2011 9:13 AM Using the ADF Faces JavaScript API, developers can listen for user keyboard input in input components to filter or respond to specific characters or key combination. The JavaScript shown below can be used with an af:clientListener  tag on  af:inputListOfValues  or  af:inputDate . At runtime, the JavaScript code determines the component type it is executed on and either opens the LOV dialog or the input Date popup.    < af:resource  type="javascript">       /**       * function to launch dialog if cursor is in LOV or        * input date field        * @param evt argument to capture the AdfUIInputEvent object      */    function launchPopUpUsingF8( evt ) {       var component = evt.getSource();        if (evt.getKeyCode() == AdfKeyStroke.F8_KEY) {        //check for input LOV component          if (component.getTypeName() == 'AdfRichInputListOfValues') {

Dynamically add region at runtime

1-       Create a .jspx page based on your template as usual   and leave it blank until this time 2-       Create   all the bounded taskflows   that you wants and create the page fragments as usual. 3-       Create a java bean class called"DhamanJavaBean" Package org.dhaman import oracle.adf.controller.TaskFlowId; public class DhamanJavaBean {     private String taskFlowId = "/WEB-INF/emp-flow.xml#emp-flow";     public DhamanJavaBean () {         super();     }      public TaskFlowId getDynamicTaskFlowId() {       return TaskFlowId.parse(taskFlowId);   } }  At this moment the calss contains only one attribute " taskFlowId" and only one method " getDynamicTaskFlowId()" 1-       Double click the "adfc-conf.xml" unbound taskflow and click on overview tab to add a new managed ben as follow: -           Name:           dhamaBean -           Class :           org.dhaman .DhamanJavaBean -           Scope:           pageflow 2-       Now re