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 7736771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:49:41+00:00 2026-06-01T07:49:41+00:00

From web pages like this one, http://www.jsftutorials.net/components/step5.html I understand that the binding attribute in

  • 0

From web pages like this one,

http://www.jsftutorials.net/components/step5.html

I understand that the binding attribute in JSF tag/view component is to bind the view component to a Java instance of the UI component in the backing bean.

E.g., that’s what is done in the following code:

<h:inputText value="#{ myBean.someProperty}" binding="#{ myBean.somePropertyInputText}"/>

But sometimes I see code like this:

<h:commandButton id="t1" binding="#{foo}" value="Hello, World!" onclick="alert('I am #{id:cid(foo)}'); return false;" />

where id:cid is a taglib function which is defined as follow:

public static String cid(UIComponent component) {
    FacesContext context = FacesContext.getCurrentInstance();
    return component.getClientId(context);
}

In the above code, binding="#{foo}" does not bind to “a Java instance of the UI component in the backing bean”.

So what is the meaning of expressions such as binding="#{foo}" ?

  • 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-06-01T07:49:43+00:00Added an answer on June 1, 2026 at 7:49 am

    It just binds the component to the current Facelet scope. This is particularly useful if you don’t need it in the backing bean at all. This saves your backing bean code from useless properties which aren’t been used in any of the other methods at all. Note that it also works that way in JSF 1.2. Not sure about JSF 1.0/1.1 though as it uses a different and JSF-proprietary EL API.

    See also:

    • JSF component binding without bean property
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to extract some information from a web page that's contained in an
I'm creating a code that gets image's urls from any web pages, the code
I want to prevent my asp.net / c# 2008 web pages from being cached
I have this web page I'm developing that displays multiple images of one product
I want to call my web site like: http://localhost:8080/?co=grav When doing this the authentication
I am designing an html web page that mimics inline panes by defining this
We seems to be abstracting a lot of logic way from web pages and
I'm having problems dealing with unicode characters from text fetched from different web pages
I'm trying to use Python 2.7 regex's to retrieve data from sample web pages
I have used this code for extracting urls from web page.But in the line

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.