LRCC Face recognition - best practices?

Ok so we are all new to the wonderful world of face recognition in LR.  I'm trying to work out what would be the best practices for using this.
A little bit of background - I have a catalog of over 200,000 images.  In addition to portrait and wedding clients, a significant part of my work is with models and another significant part of my work is theatre photography.  I have be wanting some sort of face recognition to help with both for some time.
What are your namining conventions for people? - here's mine:
Ideally I would label people as "surname, firstname" so that I can keep members of a family together in "named people" display, but commas are not allowed in names.  Also the professional name of many models doesn't fit that pattern eg "Strawberry Venom" or "Cute as Sin" are to models I have worked with.
I am trying to come up with a sensible naming convention at the moment it is "Surname/ Firstname" for clients, theatre folk and friends/family.  Models are still a problem, at present I am thinking of "Surname/ Firstname (model name(s))"  While I may not be able to remember the real names of models, I do usually know the names from model releases.  This naming will still permit me to filter/find them in the keyword List panel by just entering the model name.
On final addition I am making to this this naming convention is the use of a hashtag suffix to the name:  #F for friends and family, #C for clients, #T for theatre/actors and #M for models.  This enables me to filter on just models, or just actors, or just friends and familiy.  Where people fall into multiple categories I add multiple hashtags.  So photos of me would be keyworded with "Butterfield/ Ian #F #T"
Unknown / unidentified people.
What I am not yet certain about is how to handle unknown / unidentified people.  Unidentified people fall into a number of different categories.
People I don't know and I am never likely to know (Eg random strangers on the street, local tour guides on holiday, random people in the background etc)
This group is relatively easy to deal with - that is to simply delete the face recognition, End of story.
People I don't know the names of yet but I am likely to find out (Eg actors in a production for which I don't have a programme)
For these people I am making up a unique name using the format "date/ Context-Gendernn" Eg an unknown male actor at Stockport Garrick Theatre would be named as "20150313/ SGT-M01"  Although this may appear a complex solution it has a number of advantages.  If/when I do learn the name of the individual (Eg I photograph them in a different production) it is simply a case of renaming the people keyword.  Creating a unique name and not simple assigning all unknowns to a bucket name will help the face recognition algorithms find this person without it being confused by have different faces assigned to the same name. I am also using the hashtage #U to make it easier to filter the unknown faces when I need to.
People I don't know the names of and there is only a slim possibility of meeting/photographing again (Eg guests as a client weeding)
It feels as though I out to just delete the face recognition and have done with it, and this is what I would do except for thing. Other than manually drawing face regions I have not yet found a way to get lightroom to rescan a folder for faces if you have previously deleted the face recognition.  This means that deleting face regions from a large number of people is something that cannot be easily reversed.  I might just leave these people in the "Unnamed People" category... at lease until such time as there is a way to rescan a folder or colectoin.
Summary
My practices are still evolving. But I hope these thoughts and idea will help others think through the issues and come up with solutions that work for their situation.  I am interested in hearing how other people are using the face recognition system.  Especially if anyone is aware of any 'best practices' that Adobe or anyone else has recommended.

Glad it helped.
Yes and no.  You can still put the people keywords into hierarchies within the keyword list - you can arrange them just like any other keywords.so you just create a "smith family" keyword and store "john smith" under it.  What you can't do is apply BOTH smith family and john smith the the same face.
My use of the hash tags came about because I initially had a top level keyword for models, one for clients, one for theatre peple and one for family and firends.  Then discovered that some of the theatre folk were also clients (headshots) and what to do when a friend is also a client.  So the hash tag system means a person can be both a friend, a model, an actor as well as being a client!  (#T #C #M #F).

Similar Messages

  • Facial Recognition-- Best Practice

    Question about facial recognition for tagging, Lets say you have a person who has baby pictures, child pictures, teenager, and adult pictures.
    should you tell PE that these are different people (john infant, john child, john teenager, john adult) to make the searching more accurate. (then you can combine them manually)
    Or, should you tell PE that these are the same people  John, and it can figure out the changes without any confusion.

    Good questions.  Annecdotally, PSE automatically recognized a photo of me when I was 1, after I tagged a number of photos of me as an adult.  Don't know how representative that is, but I would bet that it's not going to recognize me as a teenager!
    As for technical references, I'm not aware of any that Adobe has published.  It appears that Adobe has licensed the technology from Cognitec:
    http://www.cognitec-systems.de/News-Details.61+M58e94ecfeec.0.html
    If you're a programmer, you can read the Cognitec SDK manual:
    http://www.cognitec-systems.de/fileadmin/cognitec/media/products/FaceVACS-SDK/FaceVACS-SDK _Manual.pdf
    An interesting nugget:
    Facial pose requirements 
    While a frontal view of the upright face is recommended, some deviations are admissible. A horizontal (yaw) or nose up/down (pitch) rotation of the head of up to 15 degrees is admissible. Also, the face is admitted to deviate from upright view (roll) up to 15 degrees.

  • Java Server Faces best Practices

    Hello,
    I am starting to like JSF. But I want to know the following.
    Where is the contoller in a JSF application, is it the Managed Bean???? or a Backing Bean?
    Should I put my Business Delegate on a Managed Bean? or in a Backing Bean? What is the difference?
    Can anyone tell?.
    I would like to know JSF Best Practices? Blueprints?.
    Thanks.
    Saludos,
    <Rory/>

    Hi Senthruan,
    The documentation referenced by the following links is based on an older version of JavaServer Faces technology.
    Backing Beans:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/J
    FUsing3.html
    UI Components :
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/J
    FUsing3.html (just as a visual example).You should instead use the J2EE tutorial (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html), which is based on version 1.1 of JavaServer Faces technology. The JavaSErver Faces material starts with chapter 17. The topics have moved around a bit, but the tutorial has a nice search engine, so you shouldn't have trouble finding the information you need.
    Jennifer

  • Jdev101304 SU5 - ADF Faces - Web app deployment best practice|configuration

    Hi Everybody:
    1.- We have several web applications that provides a service/product used for public administration purposes.
    2.- the apps are using adf faces adf bc.
    2.- All of the apps are participating on javaSSO.
    3.- The web apps are deployed in ondemand servers.
    4.- We have notice, that with the increase of users on this dates, the sessions created by the middle tier in the database, are staying inactive but never destroyed or removed.
    5.- Even when we only sing into the apps using javasso an perform no transacctions (like inserting or deleting something), we query the v$sesisons in the database, and the number of inactive sessions is always increasing, until the server colapse.
    So, we want to know, if this is an issue of the configurations made on the Application Module's properties. And we want to know if there are some "best practices" that you could provide us to configure a web application and avoid this behavior.
    The only configurations that we found recomended for web apps is set the jbo.locking.mode to optimistic, but this doesn't correct the "increasing inactive sessions" problem.
    Please help us to get some documentation or another resource to correct configure our apps.
    Thnks in advance.
    Edited by: alopez on Jan 8, 2009 12:27 PM

    hi alopez
    Maybe this can help, "Understanding Application Module Pooling Concepts and Configuration Parameters"
    see http://www.oracle.com/technology/products/jdev/tips/muench/ampooling/index.html
    success
    Jan Vervecken

  • ADF Faces : session timeout best practice

    hi
    I made these small modifications to the web.xml file in the SRDemoSample application:
    (a) I changed the login-config from this ...
      <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
          <form-login-page>infrastructure/SRLogin.jspx</form-login-page>
          <form-error-page>infrastructure/SRLogin.jspx</form-error-page>
        </form-login-config>
      </login-config>... to this
      <login-config>
        <auth-method>BASIC</auth-method>
      </login-config>(b) I changed the session-timeout to 1 minute.
      <session-config>
        <session-timeout>1</session-timeout>
      </session-config>Please consider this scenario:
    (1) Run the UserInterface project of the SRDemoSample application in JDeveloper.
    (2) Authenticate using "sking" and password "welcome".
    (3) Click on the "My Service Requests" tab.
    (4) Click on a "Request Id" like "111". You should see a detail page titled "Service Request Information for SR # 111" that shows detail data on the service request.
    (5) Wait for at least one minute for the session to timeout.
    (6) Click on the "My Service Requests" tab again. I see the same detail page as in (4), now titled "Service Request Information for SR #" and not showing any detail data.
    question
    What is the best practice to detect such session timeouts and handle them in a user friendly way in an ADF Faces application?
    thanks
    Jan Vervecken

    Hi,
    no. Here's the content copied from a word doc:
    A frequent question on the JDeveloper OTN forum, and also one that has been asked by customers directly, is how to detect and graceful handle user session expiry due to user inactivity.
    The problem of user inactivity is that there is no way in JavaEE for the server to call the client when the session has expired. Though you could use JavaScript on the client display to count
    down the session timeout, eventually showing an alert or redirecting the browser, this goes with a lot of overhead. The main concern raised against unhandled session invalidation due to user
    inactivity is that the next user request leads to unpredictable results and errors messages. Because all information stored in the user session get lost upon session expiry, you can't recover the
    session and need to start over again. The solution to this problem is a servlet filter that works on top of the Faces servlet. The web.xml file would have the servlet configured as follows
    1.     <filter>
    2.         <filter-name>ApplicationSessionExpiryFilter</filter-name>
    3.         <filter-class>
    4.             adf.sample.ApplicationSessionExpiryFilter
    5.         </filter-class>
    6.         <init-param>
    7.             <param-name>SessionTimeoutRedirect</param-name>
    8.             <param-value>SessionHasExpired.jspx</param-value>
    9.         </init-param>
    10.     </filter>
    This configures the "ApplicationSessionExpiryFilter" servlet with an initialization parameter for the administrator to configure the page that the filter redirects the request to. In this
    example, the page is a simple JSP page that only prints a message so the user knows what has happened. Further in the web.xml file, the filter is assigned to the JavaServer Faces
    servlet as follows
    1.     <filter-mapping>
    2.             <filter-name>ApplicationSessionExpiryFilter</filter-name>
    3.             <servlet-name>Faces Servlet</servlet-name>
    4.         </filter-mapping>
    The Servlet filter code compares the session Id of the request with the current session Id. This nicely handles the issue of the JavaEE container implicitly creating a new user session for the incoming request.
    The only special case to be handled is where the incoming request doesn't have an associated session ID. This is the case for the initial application request.
    1.     package adf.sample;
    2.     
    3.     import java.io.IOException;
    4.     
    5.     import javax.servlet.Filter;
    6.     import javax.servlet.FilterChain;
    7.     import javax.servlet.FilterConfig;
    8.     import javax.servlet.ServletException;
    9.     import javax.servlet.ServletRequest;
    10.     import javax.servlet.ServletResponse;
    11.     import javax.servlet.http.HttpServletRequest;
    12.     import javax.servlet.http.HttpServletResponse;
    13.     
    14.     
    15.     public class ApplicationSessionExpiryFilter implements Filter {
    16.         private FilterConfig _filterConfig = null;
    17.        
    18.         public void init(FilterConfig filterConfig) throws ServletException {
    19.             _filterConfig = filterConfig;
    20.         }
    21.     
    22.         public void destroy() {
    23.             _filterConfig = null;
    24.         }
    25.     
    26.         public void doFilter(ServletRequest request, ServletResponse response,
    27.                              FilterChain chain) throws IOException, ServletException {
    28.     
    29.     
    30.             String requestedSession =   ((HttpServletRequest)request).getRequestedSessionId();
    31.             String currentWebSession =  ((HttpServletRequest)request).getSession().getId();
    32.            
    33.             boolean sessionOk = currentWebSession.equalsIgnoreCase(requestedSession);
    34.           
    35.             // if the requested session is null then this is the first application
    36.             // request and "false" is acceptable
    37.            
    38.             if (!sessionOk && requestedSession != null){
    39.                 // the session has expired or renewed. Redirect request
    40.                 ((HttpServletResponse) response).sendRedirect(_filterConfig.getInitParameter("SessionTimeoutRedirect"));
    41.             }
    42.             else{
    43.                 chain.doFilter(request, response);
    44.             }
    45.         }
    46.        
    47.     }
    This servlet filter works pretty well, except for sessions that are expired because of active session invalidation e.g. when nuking the session to log out of container managed authentication. In this case my
    recommendation is to extend line 39 to also include a check if security is required. This can be through another initialization parameter that holds the name of a page that the request is redirected to upon logout.
    In this case you don't redirect the request to the error page but continue with a newly created session.
    Ps.: For testing and development, set the following parameter in web.xml to 1 so you don't have to wait 35 minutes
    1.     <session-config>
    2.         <session-timeout>1</session-timeout>
    3.     </session-config> Frank
    Edited by: Frank Nimphius on Jun 9, 2011 8:19 AM

  • What is the best face recognition app for ipad ?

    I have tons of family photos and unfortunetlt have no clue who some people are. what is the best face recognition program for my ipad?

    Have a look at the following (in my order of preference)
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1

  • Best practice on how to handle employees who do not have a last name?

    We are a Canadian based company with some International employees. We have recently begun to enter the International employees into the HR module. This has led to some problems for employees from India who do not have both a first name and a last name as many of our downstream systems require both names.
    I'm wondering what other companies with International employees have done in this circumstance. Can someone recommend a Best Practice?  We want to ensure that whatever we do is not offensive to anyone.
    Thanks.

    Dear,
    Indian names vary from region to region. Sometimes Names also influence by religion and caste. Different languages spoken in India in different regions. This variety makes confusing differences in names and their styles.
    Now come to the point, since you are international company, while entering the names of your international employees - i would like to suggest to consider the employees names as mentioned in their passport (If they hold valid passport). In case of non availability of passports consider their bank information or any other available information so that they didnt face any further problems like visa, banking transactions etc etc.
    1. Maddepalli Venkata Ramana Rao
    In this case Maddepalli will be his surname, Venkata Ramana can be his first name and Rao can be mentioned as Second / last name.
    2. Hardev Singh
    In this case you didnt find a surname... Singh will be considered as Surname or his ethinic recognition. In this case you can enter Hardev as First name and Singh as last name.
    Make some entry fields are optional depending on the situation. Take help of an Indian origin employees help exists in your office.
    Regards,
    Syed Hussain.

  • Best practices: migrating from Aperture 2 to Aperture 3

    What are the best practices for moving from Aperture 2 to Aperture 3. One thing I do know from reading the discussions board is to turn off Faces recognition until everything is working. What else?

    Make sure you do a full backup and rebuild on the aperture 2 library before you migrate. (opt-cmd when you open Aperture 2)
    Aperture 3 may slow down on you don't be scared it will finish. Mine took 1 1-/2 days, about 30,000 raw photos / 800GB.
    Don't reprocess masters until Aperture is done with everything it needs to do, keep an eye on the activity window.
    After you reprocess masters it will take a long time to generate thumbnails, again don't worry.
    Bill Debevc
    sshaphotos.com

  • Face recognition in shareoint

    Dear Experts,
    could you please suggest me that, can we implement document approval in SharePoint  using  "Face recognition"?
    Thank you..
    Hari

    Yes. I'll need a team of 20, four years and a budget of $20 million and approximately 460Kg of Jelly Beans (instalment deliveries of Jelly beans would be accepted).
    In practical terms, not as far as I know and not at a reasonable price point. Your best bet would be to leverage the face-unlocking tools on mobile phones to 'authenticate' users and then use those devices to sign documents in some way. That could probably
    shave a year or two off the timeline.
    I would do that for only $1 million :)

  • JSF - Best Practice For Using Managed Bean

    I want to discuss what is the best practice for managed bean usage, especially using session scope or request scope to build database driven pages
    ---- Session Bean ----
    - In the book Core Java Server Faces, the author mentioned that most of the cases session bean should be used, unless the processing is passed on to other handler. Since JSF can store the state on client side, i think storing everything in session is not a big memory concern. (can some expert confirm this is true?) Session objects are easy to manage and states can be shared across the pages. It can make programming easy.
    In the case of a page binded to a resultset, the bean usually helds a java.util.List object for the result, which is intialized in the constructor by query the database first. However, this approach has a problem: when user navigates to other page and comes back, the data is not refreshed. You can of course solve the problem by issuing query everytime in your getXXX method. But you need to be very careful that you don't bind this XXX property too many times. In the case of querying in getXXX, setXXX is also tricky as you don't have a member to set. You usually don't want to persist the resultset changes in the setXXX as the changes may not be final, in stead, you want to handle in the actionlistener (like a save(actionevent)).
    I would glad to see your thought on this.
    --- Request Bean ---
    request bean is initialized everytime a reuqest is made. It sometimes drove me nuts because JSF seems not to be every consistent in updating model values. Suppose you have a page showing parent-children a list of records from database, and you also allow user to change directly on the children. if I hbind the parent to a bean called #{Parent} and you bind the children to ADF table (value="#{Parent.children}" var="rowValue". If I set Parent as a request scope, the setChildren method is never called when I submit the form. Not sure if this is just for ADF or it is JSF problem. But if you change the bean to session scope, everything works fine.
    I believe JSF doesn't update the bindings for all component attributes. It only update the input component value binding. Some one please verify this is true.
    In many cases, i found request bean is very hard to work with if there are lots of updates. (I have lots of trouble with update the binding value for rendered attributes).
    However, request bean is working fine for read only pages and simple binded forms. It definitely frees up memory quicker than session bean.
    ----- any comments or opinions are welcome!!! ------

    I think it should be either Option 2 or Option 3.
    Option 2 would be necessary if the bean data depends on some request parameters.
    (Example: Getting customer bean for a particular customer id)
    Otherwise Option 3 seems the reasonable approach.
    But, I am also pondering on this issue. The above are just my initial thoughts.

  • Sessions and Controllers best-practice in JSF2

    Hi,
    I've not done web development work since last using Apache Struts for its MVC framework ( about 6 years ago now ). So bear with me if my questions does not make sense:
    SESSIONS
    1) Reading through the JSF2 spec PDF, it mentions about state-saving via the StateManager. I presume this is also the same StateManager that it used to store managed-beans that are in @SessionScoped ?
    2) In relation to session-scoped managed beans, when does a JSF implementation starts a new session ? That is, when does the implementation such as Mojarra call ExternalContext.getSession( true ) .. and when does it simply uses an existing session ( calling ExternalContext.getSession( false ) ) ?
    3) In relation to session-scoped managed beans, when does a JSF implementation invalidate a session ? That is, when does the implementation call ExternalContext.invalidateSession() ?
    4) Does ExternalContext.getSession( true ) or ExternalContext.invalidateSession() even make sense if the state-saving mechanism is client ? ( javax.faces.STATE_SAVING_METHOD = client ) Will the JSF implementation ever call these methods if the state-saving mechanism is client ?
    CONTROLLERS
    Most of the JSF2 tutorials that I have been reading on-line uses the same backing-bean when perfoming an action on the form ( when doing a POST or a GET or a post-back to the same page ).
    Is this best practice ? It looks like mixing what should have been a simple POJO with additional logic that should really be in a separate class.
    What have others done ?

    gimbal2 wrote:
    jmsjr wrote:
    EJP wrote:
    It's better because it ensures the bean gets instantiated, stuck in the session, which gets instantiated itself, the bean gets initialised, resource-injected, etc etc etc. Your way goes goes behind the scenes and hopes for the best, and raises complicated questions that don't really need answers.Thanks.
    1) But if I only want to check that the bean is in the session ... and I do NOT want to create an instance of the bean itself if it does not exist, then I presume I should still use ExternalApplication.getSessionMap.get(<beanName>).I can't think of a single reason why you would ever need to do that. Checking if a property of a bean in the session is populated however is far more reasonable to me.In my case, there is an external application ( e.g. a workflow system from a vendor ) that will open a page in the JSF webapp.
    The user is already authenticated in the workflow system, and the external system from the vendor sends along the username and password and some parameters that define what the request is about ( e.g. whether to start a new case, or open an existing case ). There will be no login page in the JSF webapp as the authentication was already done externally by the workflow system.
    Basically, I was think of implementing a PhaseListener that would:
    1) Parse the request from the external system, and store the relevant username / password and other information into a bean which I store into the session.
    2) If the request parameter does not exist, then I go look for a bean in the session to see if the actual request came from within the JSF webapp itself ( e.g. if it was not triggered from the external workflow system ).
    3) If this bean does not exist at all ( e.g. It was triggered by something else other than the external workflow system that I was expecting ) then I would prefer that it would avoid all the JSF lifecycle for the current request and immediately do a redirect to a different page ( be it a static HTML, or another JSF page ).
    4) If the bean exist, then proceed with the normal JSF lifecycle.
    I could also, between [1] and [2], do a quick check to verify that the username and password is indeed valid on the external system ( they have a Java API to do that ), and if the credentials are not valid, I would also avoid all the JSF lifecycle for the current request and redirect to a different page.

  • Best Practice for Master Data Reporting

    Dear SAP-Experts,
    We face a challenge at the moment and we are still trying to find the right approach to it:
    Business requirement is to analyze SAP Material-related Master Data with the BEx Analyzer (Master Data Reporting)
    Questions they want to answer here are for example:
    - How many active Materials/SKUs do we have?
    - Which country/Sales Org has adopted certain Materials?
    - How many Series do we have?
    - How many SKUs below to a specific season
    - How many SKUs are in a certain product lifecycle
    - etc.
    The challenge is, that the Master Data is stored in tables with different keys in the R/3.
    The keys in these tables are on various levels (a selection below):
    - Material
    - Material / Sales Org / Distribution Channel
    - Material / Grid Value
    - Material / Grid Value / Sales Org / Distribution Channel
    - Material / Grid Value / Sales Org / Distribution Channel / Season
    - Material / Plant
    - Material / Plant / Category
    - Material / Sales Org / Category
    etc.
    So even though the information is available on different detail  levels, the business requirement is to have one query/report that combines all the information. We are currently struggeling a bit on deciding, what would be the best approach for this requirement. Did anyone face such a requirement before - and what would be the best practice. We already tried to find any information online, but it seems Master data reporting is not very well documented. Thanks a lot for your valuable contribution to this discussion.
    Best regards
    Lukas

    Pass a reference to the parent into the modal popup. Then you
    can reference anything in the parent scope.
    I haven't done this i 2.0 yet so I can't give you code. I'll
    post if I do.
    Oh, also, you can reference the parent using parentDocument.
    So in the popup you could do:
    parentDocument.myPublicVariable = "whatever";
    Tracy

  • Best practice for mouseless ADF applications

    I am developing an ADF application where the users do not want to use the mouse.
    So I would like to know if there are a best practice for this?
    I am already using the accessKey functionality and subforms defaultCommand
    But I have had problems setting focus to objects on a page like tables. I would like a button to return the focus to the table after it has made the command like delete.
    I have implemented a solution where I have found inspiration several threads and other webpages (see below).
    Is this solution okay?
    Are there any problems with it?
    I would also like to know if there are better pathways to go like
    out of the box solutions,
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/79-global-template-button-strategy-360139.pdf (are there an example implementation?), or
    http://one-size-doesnt-fit-all.blogspot.dk/2010/11/adf-ui-shell-supporting-global-hotkeys.html
    in advance thanks
    Inspiration webpages
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
    http://technology.amis.nl/2008/01/04/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/
    how to Commit table by writting Java code in Managed Bean?
    Table does not refresh and getting error as UIComponent is Null
    A short description of the solution:
    (jdeveloper version 11.1.1.2.0)
    --- Example where I use onSetFocus in jsff page
    <af:commandButton text="#{hrsusuiBundle.FOCUS}" id="cb10"
    partialSubmit="true" accessKey="f"
    shortDesc="Alt+Shift+F"
    actionListener="#{managedBean_clientUtils.onSetFocus}">
    <af:clientAttribute name="focusField" value="t1"/>
    </af:commandButton>
    --- Examples where I use doTableActionAndSetFocus in jsff page
    --- There have to be a binding in the jsff page to delete, commit and rollback
    <af:commandButton text="#{hrsusuiBundle.DELETE}" id="cb4"
    accessKey="x"
    shortDesc="Alt+Shift+X"
    partialSubmit="true"
    actionListener="#{managedBean_clientUtils.doTableActionAndSetFocus}">
    <af:clientAttribute name="focusField" value="t1"/>
    <af:clientAttribute name="actionField" value="Delete"/>
    </af:commandButton>
    <af:commandButton text="#{hrsusuiBundle.COMMIT}" id="cb5"
    accessKey="s" shortDesc="Alt+Shift+S"
    partialSubmit="true"
    actionListener="#{managedBean_clientUtils.doTableActionAndSetFocus}">
    <af:clientAttribute name="focusField" value="t1"/>
    <af:clientAttribute name="actionField" value="Commit"/>
    </af:commandButton>
    <af:commandButton text="#{hrsusuiBundle.ROLLBACK}" id="cb6"
    accessKey="z" shortDesc="Alt+Shift+Z"
    partialSubmit="true"
    actionListener="#{managedBean_clientUtils.doTableActionAndSetFocus}"
    immediate="true">
    <af:resetActionListener/>
    <af:clientAttribute name="focusField" value="t1"/>
    <af:clientAttribute name="actionField" value="Rollback"/>
    </af:commandButton>
    --- This is the java class I use
    --- It is published in adfc-config.xml as a request scope managedbean
    public class ClientUtils {
    public ClientUtils() {
    public void doTableActionAndSetFocus(ActionEvent event) {
    RichCommandButton rcb = (RichCommandButton)event.getSource();
    String focusOn = (String)rcb.getAttributes().get("focusField");
    String actionToDo = (String)rcb.getAttributes().get("actionField");
    UIComponent component = null;
    String clientId = null;
    component = JSFUtils.findComponentInRoot(focusOn);
    clientId = component.getClientId(JSFUtils.getFacesContext());
    if ( "Delete".equals(actionToDo) || "Commit".equals(actionToDo) || "Rollback".equals(actionToDo) ){
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    OperationBinding operationBinding = bindings.getOperationBinding(actionToDo);
    Object result = operationBinding.execute();
    AdfFacesContext.getCurrentInstance().addPartialTarget(component);
    if (clientId != null) {           
    makeSetFocusJavaScript(clientId);
    public static String onSetFocus(ActionEvent event) {
    RichCommandButton rcb = (RichCommandButton)event.getSource();
    String focusOn = (String)rcb.getAttributes().get("focusField");
    String clientId = null;
    if (focusOn.contains(":")) {
    clientId = focusOn;
    } else {
    clientId = findComponentsClientIdInRoot(focusOn);
    if (clientId != null) {           
    makeSetFocusJavaScript(clientId);
    return null;
    private static void writeJavaScriptToClient(String script) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ExtendedRenderKitService erks = null;
    erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
    erks.addScript(fctx, script);
    public static void makeSetFocusJavaScript(String clientId) {
    if (clientId != null) {
    StringBuilder script = new StringBuilder();
    //use client id to ensure component is found if located in
    //naming container
    script.append("var textInput = ");
    script.append("AdfPage.PAGE.findComponentByAbsoluteId");
    script.append ("('"+clientId+"');");
    script.append("if(textInput != null){");
    script.append("textInput.focus();");
    script.append("}");
    writeJavaScriptToClient(script.toString());
    public static String findComponentsClientIdInRoot(String id) {
    UIComponent component = null;
    String clientId = null;
    component = JSFUtils.findComponentInRoot(id);
    clientId = component.getClientId(JSFUtils.getFacesContext());
    return clientId;
    }

    Hi,
    I am developing an ADF application where the users do not want to use the mouse. So I would like to know if there are a best practice for this?
    Well HTML (and this is the user interface you see) follows a tab index navigation that you follow with "tab" and "shift+tab". Anything else is a short cut for which you use mnemonics (as you already do) or shortcuts (explained in http://one-size-doesnt-fit-all.blogspot.dk/2010/11/adf-ui-shell-supporting-global-hotkeys.html). There is a distinction to make between non-web environments (which I think you and your users have abackground in) and client desktop environments. Browsers block some keyboard functionality for their own purpose. So you may have to find a list of keys first that work across browsers. Unlike desktop clients, which allow you to "press a button" without the button to take focus, this cannot be done on the web. So you need to be clever here, avoiding buttons at all.
    The following paper is about JavaScript in ADF and explains the basics for what Chris Muir explains in : http://one-size-doesnt-fit-all.blogspot.dk/2010/11/adf-ui-shell-supporting-global-hotkeys.html
    http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    It has the outline for how to register short cut keys that perform a specific action (e.g. register ctrl+d to delete the current row you are on, or press F11 to execute a query (similar to Oracle Forms frmres files)). However, be aware that this includes some code you have to write (actually quite some code to be honest).
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/79-global-template-button-strategy-360139.pdf (are there an example implementation?), or
    http://one-size-doesnt-fit-all.blogspot.dk/2010/11/adf-ui-shell-supporting-global-hotkeys.html
    Actually these are implementations as they come with example code for you to use and customize, do they? So what is this question asking for more ? Also note that global buttons don't quite have anything in common with the question you asked. I assume you want to see it as an implementation of the Forms toolbar that operates on the form or table the focus is in. This however does not work for the web as there is nothing that keeps track of which component has a focus and to what iterator (data block) it belongs. This would involve even more coding (though possibly doable)
    Frank

  • Select One Choice attribute' LoV based on two bind variables, best practice

    Hello there,
    I am in the process of learning the ADF 11g, I have following requirement,
    A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
    I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
    added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
    added the name attribute as Select One Choice to page2,
    and now I need to pass the values of the bind variables of the ReadOnly view,
    the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
    I have implemented the next two appraoches but both resulted in an empty list :
    * added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
    in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
    * added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
    if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
    and what is the best practice to implement that requirement?
    would the solution be : by setting the default value of the bind variables to be some kind of Expression!
    please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
    would you give some hints or redirect me to a useful link,
    Thanks in advance
    Regards,

    please give me any example using backing bean .for example
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
    autoSubmit="true">
    <af:selectItem label="A" value="1" id="si1"/>
    <af:selectItem label="B" value="2" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
    partialTriggers="soc1">
    <af:selectItem label="C" value="3" id="si3"/>
    <af:selectItem label="D" value="4" id="si4"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    package a;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class A {
    private RichSelectOneChoice l1;
    public A() {
    public void setL1(RichSelectOneChoice l1) {
    this.l1 = l1;
    public RichSelectOneChoice getL1() {
    return l1;
    is there any mistake

  • Best practice for component layout?

    Hi,can people tell me their views on best practice in this area, using JSF.
    Eg, say I want this:
        LabelSml    InputField
        LabelLarge  InputField... ie 2 labels, 2 fields, vertically alligned, and with some space between the label and the field.
    and this one:
        Field                             Field... ie 2 fields with a lot of space between them.
    Finally, are there any examples on the web of UIs with many discrete fields on them (as opposed to logon/helloWorld and matrix data control), where I can look at how the design has been done.
    Marc

    I don't know if our solution is a best practice. We are not using the label property of input components because the alignment does not satisfy then. Instead we are using a <h:panelGrid> and nest <ui:label> and <ui:textField> (Studio Creator components) components in it. Multiple components in one cell are surrounded with a nested layout or grid panel. The number of columns is set by the attribute "columns" and width is controlled by the attribute "columnClasses". Example
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:bp="http://java.sun.com/blueprints/ui/14" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
        xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view locale="#{SessionBean1.locale}">
            <f:loadBundle basename="com.asci.nef.resourcen.Aktionen" var="akt"/>
            <f:loadBundle basename="com.asci.nef.resourcen.Label" var="lab"/>
            <f:loadBundle basename="com.asci.nef.resourcen.Datenlisten" var="datenlisten"/>
            <f:loadBundle basename="com.asci.nef.resourcen.Meldungen" var="msg"/>
            <ui:page binding="#{personal$Mitarbeiterauswahl.page1}" id="page1">
                <ui:html binding="#{personal$Mitarbeiterauswahl.html1}" id="html1">
                    <ui:head binding="#{personal$Mitarbeiterauswahl.head1}" id="head1">
                        <ui:link binding="#{personal$Mitarbeiterauswahl.link1}" id="link1" url="/resources/stylesheet.css"/>
                        <ui:script binding="#{personal$Mitarbeiterauswahl.scriptFenster}" id="scriptFenster" url="/resources/fenster.js"/>
                    </ui:head>
                    <ui:body binding="#{personal$Mitarbeiterauswahl.body1}" id="body1" style=" -rave-layout: grid">
                        <jsp:directive.include file="../Menue.jspf"/>
                        <ui:form binding="#{personal$Mitarbeiterauswahl.form1}" id="form1">
                            <div>
                                <jsp:directive.include file="../Fensterkennung.jspf"/>
                            </div>
                            <ui:tabSet binding="#{personal$Mitarbeiterauswahl.tabSetPersonaldaten}" id="tabSetPersonaldaten" selected="tabSuchen" style="position: absolute; left: 0px; top: 36px; width: 100%;">
                                <ui:tab binding="#{personal$Mitarbeiterauswahl.tabSuchen}" id="tabSuchen" text="#{akt.funktion110}">
                                    <ui:panelLayout binding="#{personal$Mitarbeiterauswahl.layoutPanelSuchen}" id="layoutPanelSuchen">
                                        <h:panelGrid binding="#{personal$Mitarbeiterauswahl.gridPanelSuchen}" columnClasses="gridlabel, griddata" columns="2"
                                            id="gridPanelSuchen" style="position:absolute; left:100px; top:30px;">
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelPersonalnummerSuchen}" id="labelPersonalnummerSuchen" text="#{lab.mitarbeiterauswahl_personalnummer}"/>
                                            <ui:textField binding="#{personal$Mitarbeiterauswahl.textFieldPersonalnummerSuchen}" converter="javax.faces.Long"
                                                id="textFieldPersonalnummerSuchen" maxLength="10" styleClass="eingabe1"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelNameSuchen}" for="textFieldNameSuchen" id="labelNameSuchen" text="#{lab.mitarbeiterauswahl_name}"/>
                                            <ui:textField binding="#{personal$Mitarbeiterauswahl.textFieldNameSuchen}" converter="TextTrim" id="textFieldNameSuchen"
                                                maxLength="30" styleClass="eingabe4"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelGeburtsdatumSuchen}" id="labelGeburtsdatumSuchen" text="#{lab.mitarbeiterauswahl_geburtsdatum}"/>
                                            <ui:textField binding="#{personal$Mitarbeiterauswahl.textFieldGeburtsdatumSuchen}"
                                                converter="#{SessionBean1.sqlDateConverter}" id="textFieldGeburtsdatumSuchen" maxLength="10" styleClass="eingabe1"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelTaetigkeitSuchen}" id="labelTaetigkeitSuchen" text="#{lab.mitarbeiterauswahl_taetigkeit}"/>
                                            <ui:dropDown binding="#{personal$Mitarbeiterauswahl.dropDownTaetigkeitSuchen}" id="dropDownTaetigkeitSuchen"
                                                items="#{personal$Mitarbeiterauswahl.listOptionsTaetigkeitSuchen}" styleClass="eingabe4"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelVereinbarungSuchen}" id="labelVereinbarungSuchen" text="#{lab.mitarbeiterauswahl_zusatzvereinbarung}"/>
                                            <ui:textField binding="#{personal$Mitarbeiterauswahl.textFieldVereinbarungSuchen}" id="textFieldVereinbarungSuchen" styleClass="eingabe4"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelSortieren}" id="labelSortieren" text="#{lab.mitarbeiterauswahl_sortieren}"/>
                                            <ui:radioButtonGroup binding="#{personal$Mitarbeiterauswahl.radioButtonGroupSortieren}" columns="4"
                                                id="radioButtonGroupSortieren"
                                                items="#{personal$Mitarbeiterauswahl.radioButtonGroupSortierenDefaultOptions.options}" required="true" selected="#{personal$Mitarbeiterauswahl.radioButtonGroupSortierenDefaultOptions.selectedValue}"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelDummy1}" id="labelDummy1"/>
                                            <ui:button action="#{personal$Mitarbeiterauswahl.buttonSuchen_action}"
                                                binding="#{personal$Mitarbeiterauswahl.buttonSuchen}" id="buttonSuchen" text="#{akt.button_suchen}"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelDummy2}" id="labelDummy2"/>
                                            <ui:listbox binding="#{personal$Mitarbeiterauswahl.listboxSuche}" id="listboxSuche" monospace="true"
                                                onDblClick="#{personal$Mitarbeiterauswahl.onDblClickAction}" rows="20" styleClass="eingabe7"/>
                                            <ui:label binding="#{personal$Mitarbeiterauswahl.labelDummy3}" id="labelDummy3"/>
                                            <ui:panelLayout binding="#{personal$Mitarbeiterauswahl.layoutPanelButtons2}" id="layoutPanelButtons2" panelLayout="flow">
                                                <ui:button action="#{personal$Mitarbeiterauswahl.buttonNeu_action}"
                                                    binding="#{personal$Mitarbeiterauswahl.buttonNeu}" id="buttonNeu" immediate="true" text="#{akt.button_neu}"/>
                                                <ui:button action="#{personal$Mitarbeiterauswahl.buttonBearbeiten_action}"
                                                    binding="#{personal$Mitarbeiterauswahl.buttonBearbeiten}" id="buttonBearbeiten" text="#{akt.button_bearbeiten}"/>
                                                <ui:button action="#{personal$Mitarbeiterauswahl.buttonLoeschen_action}"
                                                    binding="#{personal$Mitarbeiterauswahl.buttonLoeschen}" id="buttonLoeschen" text="#{akt.button_loeschen}"/>
                                            </ui:panelLayout>
                                        </h:panelGrid>
                                    </ui:panelLayout>
                                </ui:tab>
                            </ui:tabSet>
                            <h:panelGrid binding="#{personal$Mitarbeiterauswahl.gridPanelFehler}" id="gridPanelFehler" onclick="this.style.display = 'none';" style="position: absolute; right: 20px; bottom: 50px; width: 250px; height: 78px;"/>
                            <ui:panelLayout binding="#{personal$Mitarbeiterauswahl.layoutPanelConfirm}" id="layoutPanelConfirm" panelLayout="flow" style="position:absolute; top:36px; left:0px;width:100%; height:700px;">
                                <h:panelGrid binding="#{personal$Mitarbeiterauswahl.gridPanelConfirm}" columns="1" id="gridPanelConfirm" style="margin-left:auto; margin-right:auto; margin-top:300px; background-color:#FF3333;">
                                    <ui:staticText binding="#{personal$Mitarbeiterauswahl.staticTextConfirm}" id="staticTextConfirm" text="#{msg.global_loeschen}"/>
                                    <ui:panelLayout binding="#{personal$Mitarbeiterauswahl.layoutPanelConfirmButtons}" id="layoutPanelConfirmButtons" panelLayout="flow">
                                        <ui:button action="#{personal$Mitarbeiterauswahl.buttonConfirmYes_action}"
                                            binding="#{personal$Mitarbeiterauswahl.buttonConfirmYes}" id="buttonConfirmYes" text="#{akt.button_ja}"/>
                                        <ui:button action="#{personal$Mitarbeiterauswahl.buttonConfirmNo_action}"
                                            binding="#{personal$Mitarbeiterauswahl.buttonConfirmNo}" id="buttonConfirmNo" text="#{akt.button_nein}"/>
                                    </ui:panelLayout>
                                </h:panelGrid>
                            </ui:panelLayout>
                        </ui:form>
                    </ui:body>
                </ui:html>
            </ui:page>
        </f:view>
    </jsp:root>

Maybe you are looking for