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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:25:33+00:00 2026-06-04T15:25:33+00:00

please help me to understand, <h:form> <h:panelGrid columns=3> <h:outputText value=Age:/> <h:inputText value=#{userBean.age} size=4/> <a4j:commandButton

  • 0

please help me to understand,

<h:form>
  <h:panelGrid columns="3">
    <h:outputText value="Age:"/>
    <h:inputText value="#{userBean.age}" size="4"/>
    <a4j:commandButton value="Enter Age" reRender="age"/>
  </h:panelGrid>
  <h:panelGrid>
    <h:outputText id="age" value="Your age: #{userBean.age}"/>
  </h:panelGrid>
</h:form>

when commandButton is clicked, how it evaluates a bean to call setters for. is it getting refrance from the bean used inside the input area?

thanks

  • 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-04T15:25:35+00:00Added an answer on June 4, 2026 at 3:25 pm

    The command button does not do that. The command button only determines for itself if an action has to be invoked and if so, which method it is. Each of the input components sets their own value. The actual job is done in the decode() method of the Renderer associated with the component. During the apply request values phase, JSF walks through all UIForm, UIInput and UICommand components. Each of them first gets the request parameter value by own client ID as request parameter name:

    String value = request.getParameter(input.getClientId(context));
    

    (the request is here HttpServletRequest and input is here UIInput)

    Then, after a process of conversion and validation where necessary, it get ultimately set as bean property referenced by its own value attribute.

    input.getValueExpression("value").setValue(context.getElContext(), value);
    

    The ValueExpression#setValue() will evaluate the #{userBean.age}, auto-create the bean if it doesn’t exist in the scope yet and then invoke the setAge() method on it with the passed-in value.

    This is all in detail described in the JSF specification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help me understand why add1() and add4() report errors and why add2() and
Please help me understand this recursive function... var stack = Array; function power(base, exponent){
Please help me understand where I am going wrong so much so that I
the following code is not behaving like I would expect. Please help me understand
Can anyone please help me to understand how should i access json data in
Please could someone help me understand why the div.fl element shown in Developer Tools
Please help me. I can't understand why this function, that uses texture memory __global__
Please help! I need to produce a Crystal Report with multiple data columns, but
Please help me to refactore this Javascript code. There is big form for scheduled
Could someone here please help me understand how to determine when floating point limitations

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.