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

  • Home
  • SEARCH
  • 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 3455698
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:38:46+00:00 2026-05-18T09:38:46+00:00

So, let me show us my troubles :) 1 – When i click on

  • 0

So, let me show us my troubles 🙂

1 – When i click on a commandbutton

<h:commandButton value="Somethings">
    <f:setPropertyActionListener target="#{bean.method}" value="some" />
    <f:ajax render="rendering"/>
</h:commandButton>

I dont do any action to the commandButton. Just i fire the ajax call. If i add an action on the button (like action="bean.myAction) it will be executedat the 5° phase of the JSF lifecycle (allright, only if i write event=”action” in the f:ajax, but thats as default). Right? But the f:ajax is fired by cliccing on the button as default? Because for a ListBox for example, it’s fired only if i write event=”change” (the same, i shouldnt write it, because is as default).

2 – When i click on image

<h:graphicImage value="img/img.png" alt="img">
    <f:setPropertyActionListener target="#{bean.method}" value="some" />
    <f:ajax event="onclick" render="rendering"/>
</h:graphicImage>

This doesnt work. Why?

As usual, thanks for the help!!!!

  • 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-18T09:38:47+00:00Added an answer on May 18, 2026 at 9:38 am

    1 – When i click on a commandbutton

    I dont do any action to the commandButton. Just i fire the ajax call. If i add an action on the button (like action=”bean.myAction) it will be executedat the 5° phase of the JSF lifecycle

    The f:setPropertyActionListener will be executed in the 5th phase as well.

    (allright, only if i write event=”action” in the f:ajax, but thats as default). Right? But the f:ajax is fired by cliccing on the button as default? Because for a ListBox for example, it’s fired only if i write event=”change” (the same, i shouldnt write it, because is as default).

    The f:ajax just changes the behaviour from a synchronous submit to asynchronous (partial) submit. It does that by generating some additional JavaScript code to the desired event attribute of the parent component (e.g. onclick, onchange, etc, look in generated HTML output in webbrowser). It doesn’t change anything in the JSF lifecycle. Only the rendered response will be a partial response which is exactly the part which is to be updated in the component(s) with ID as definied in render attribute.


    2 – When i click on image

    This doesnt work. Why?

    Because the h:graphicImage does not support f:setPropertyActionListener at all. It only works in UICommand components.

    You want to wrap it in a h:commandLink instead.

    <h:commandLink>
        <f:setPropertyActionListener target="#{bean.method}" value="some" />
        <f:ajax event="action" render="rendering"/>
        <h:graphicImage value="img/img.png" alt="img"/>
    </h:commandLink>
    

    (and if necessary style the border/underline caused by generated <a> element away with CSS)

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

Sidebar

Related Questions

i am trying to pass a string through the XmlHttp method. Let me show
I have some strange issue with isset() function in PHP. Let me show... .
a funny problem ... i can't understand it.. let me show you what i
Specifically how can I: Show a button which will let the user browse through
Let's say that I have an application frame, and I want to show a
I can't seem to find anything that would let me to easily show a
For this question, let us assume that we will want to show the face
Is there any way to have a default MessageBox.Show() caption? Let says I would
Hey all, let's jump straight to a code sample to show how ECMAScript/JavaScript/AS3 can't
I'm having trouble getting the let hand side tabs here to show up properly

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.