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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:52:19+00:00 2026-06-15T02:52:19+00:00

Strange issue, I have read through various posts, but have yet to find a

  • 0

Strange issue, I have read through various posts, but have yet to find a working answer.

When I have a h:commandButton, where I want an icon to display instead of text, I have tried.

<h:commandButton value=" " image="UpArrow.png" style="position: absolute; left: 36px; top: 17px; width: 18px; height: 18px; cursor: pointer;" title="Pan up" actionListener="#{SarWindsImagesBean.panUp('testImage.jpg')}">
    <f:ajax  render="imagePan2"/>
</h:commandButton>

<h:commandButton image="UpArrow.png" style="position: absolute; left: 36px; top: 17px; width: 18px; height: 18px; cursor: pointer;" title="Pan up" actionListener="#{SarWindsImagesBean.panUp('testImage.jpg')}">
    <f:ajax  render="imagePan2"/>
</h:commandButton>

In the first, the size is correct, but instead of the image, I get “Submit Query”.
In the second, I get the same problem.

Why is it rendering “Submit Query”? and If I add value=” “, it will not display the icon, just an empty box.

Dan

  • 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-15T02:52:22+00:00Added an answer on June 15, 2026 at 2:52 am

    That’s the browser-default value of the HTML <input type="submit"> element when the value attribute is omitted. This is not generated by JSF. Try it out yourself with such a HTML element in a plain HTML page.

    As to why adding the value attribute when the image attribute is present results in an empty box, that’s likely MyFaces specific. I can’t reproduce it in Mojarra.

    As to (ab)using the image attribute in order to present a background image, this after all not entirely right. You should be using CSS background-image property instead,

    <h:commandButton value=" " style="background-image: url(UpArrow.png)" />
    

    or just a <h:commandLink><h:graphicImage> if you don’t want to have the appearance of a button at all:

    <h:commandLink ...>
        <h:graphicImage value="UpArrow.png" />
    </h:commandLink>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange issue . I am currently working on a mail app
I have a really strange issue. I am working on a Java SWING application
I have a strange issue. I'm trying to get Apple Push Notifications working with
I'm having a strange issue that I think I have a workaround for, but
This issue was reported several times, but still not resolved yet. I read all
Strange issue. I have SQL Server running on an EC2 box that I can
I have a very strange issue with the tableview: I have a table cell
I have a somewhat strange issue with visual studio. Almost every time I create
I have a strange issue with a MVC 3 app running as an Azure
I have a very strange issue. I have an open WebSocket, the communication works

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.