Skip to main content

Posts

Showing posts with the label focus

ADF 11g Quicky 4 : Where is my cursor ?

In my current project I encountered a usability issue. The users where unable to see where the cursor was located. It was flickering, but on a page with ,multiple input components it was very difficult to locate the field where the cursor was located. I decided to help them out and that proofed to be both very simple and in the end very helpful. I used skinning to give the active field a colored background. First I defined a skin in my trinidad-config.xml <?xml version="1.0" encoding="windows-1252" ?> <skins xmlns="http://myfaces.apache.org/trinidad/skin"> <skin> <id>custom.desktop</id> <family>custom</family> <extends>fusion.desktop</extends> <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id> <style-sheet-name>skin/custom.css</style-sheet-name> </skin> </skins> Next I made sure that the application uses the skin by defining it in the...

ADF 11g Quicky 2 - Set Focus on MouseOver Event

Another Quick solution here. What if I want to set focus on a field without actually having to click it ? This can be done by using a clientListeners and some java script code. 1: <?xml version='1.0' encoding='UTF-8'?> 2: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" 3: xmlns:f="http://java.sun.com/jsf/core" 4: xmlns:h="http://java.sun.com/jsf/html" 5: xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> 6: <jsp:directive.page contentType="text/html;charset=UTF-8"/> 7: <f:view> 8: <af:document> 9: <af:resource type="javascript"> 10: function makeActive(event){ 11: event.getSource().focus(); 12: } 13: </af:resource> 14: <af:form id="f1"> 15: <af:inputText label="Label 1" id="it1"> 16: <af:clientListener type="mouseOver...