Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 533151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:28:45+00:00 2026-05-13T09:28:45+00:00

Environment: JSF 1.2 RI, RichFaces 3.3.2 We utilize jQuery for is to change CSS

  • 0

Environment: JSF 1.2 RI, RichFaces 3.3.2

We utilize jQuery for is to change CSS classes when items gain or lose focus. This is pretty straight forward, however when our partial renders are completed we are not seeing these focus and blur events bound to the newly rendered form elements. This is to be expected, as these events are not on the DOM upon the document ready, however we have attempted to utilize a couple of plugins (Listen as well as LiveQuery) since .live() does not function properly for blur and focus events in 1.3.2, nor in the version supplied with RichFaces. Each of these plugins is supposed to handle newly created items placed on the document. In practice though neither of these are behaving as expected.

We wrap our inputs / selects / textareas in a div or a span so that the rendering of various pieces is updated on our Ajax requests. This is due to a limitation in RichFaces where the rendering of items is not checked upon partial re-renders. Other than that small piece there is nothing too exciting occurring.

I have added items using $(‘ol’).after(txtForNewListItem) and confirmed that livequery is correctly working for these items, just not for items which have been freshly rendered by JSF.

Anyone had similar results and found a suitable workaround? One method I did see was to override the document.createElement, but we really hope to have to avoid that path at all costs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:28:46+00:00Added an answer on May 13, 2026 at 9:28 am

    RichFaces has this built in as the rich:jQuery component. Set the selector attribute as to what you would use within your jQuery statement. Set the query to be the function you wish to call. If you are rebinding elements which were set on load then you will need to name the component as well, as they DOM will not go through the full re-rendering lifecycle, and there will be no update.

     rich:jQuery id="focusEventBinder" selector="#arbitraryId" 
                 query="focus(function () { jQuery(this).addClass('onfocus');});" 
                 name="focusEventBinder"
    

    To resolve this simply have your component have an oncomplete attribute to the name of the rich:jQuery component you wish to call. So in the example above we would need to add this to our component:

    oncomplete="focusEventBinder();"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ENVIRONMENT: C# I have a table of equivalent values, like this: CHEVR = CHEVROLET
Environment: Seam, Richfaces The following code snippet causes the method getUsers to be called
im learning jsf enviroment, sry if this is kind of easy case for you
We have several JSF portlets running in a websphere portal environment. A developer wants
Environment: RichFaces 3.3.3 Final; Facelets 1.1.15; JBoss portletbridge 2.1.0 Final; GateIn Portal 3.1.0 as
With this maven dependency, it works : <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.4-b09</version> <scope>compile</scope> </dependency> <dependency>
In native JSF 2.0 environment user is able to refer to request parameters with
We are using JSF in our project (im pretty new to it) were every
I have done JSF work before, but am new to RichFaces. To test my
Standard Java EE environment: JPA + EJB called from JSF beans. Server: glassfish 3.1.1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.