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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:28:11+00:00 2026-05-22T11:28:11+00:00

Just a basic need but cannot get it to work. I would like to

  • 0

Just a basic need but cannot get it to work.
I would like to have a primefaces button to display my image, without any text.

But what i get is a button that contains only a ^ character and does NOT displaying the image, which only has a size of 16×16.


So, this is the primefaces button :

<p:commandButton image="ui-icon-csv" title="CSV Document" ajax="false">
    <p:dataExporter type="csv" target="gridRPBDetails" 
        fileName="#{tInputBean.exportFilename}" />
</p:commandButton>

This is the css file :

.ui-icon-csv {
    background-image: url(images/csv_small.png);
}

And this is the generated html for the button :

<button type="submit" onclick=";" 
    name="gridRPBDetails:j_idt82" id="gridRPBDetails:j_idt82" 
    class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary" 
    role="button" aria-disabled="false">
        <span class="ui-button-icon-primary ui-icon ui-icon-csv"></span><span class="ui-button-text">CSV Document</span>
</button>

And to prove the image accessible, i try this URL, and indeed it shows the picture :

http://albert:8080/mywebapp/faces/javax.faces.resource/images/csv_small.png

Im using tomcat 7, and these are my dependencies :

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>2.2.1</version>
</dependency>
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>2.0.4-b09</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-impl</artifactId>
    <version>2.0.4-b09</version>
    <scope>compile</scope>
</dependency>

Any ideas what went wrong ?

Thank you !

  • 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-22T11:28:11+00:00Added an answer on May 22, 2026 at 11:28 am

    After some investigation using firebug, i found out that the culprit is from the CSS stuff i defined.

    So these are the changes i made to make this work.


    The JSF button :

    <p:commandButton image="ui-icon-xls" title="Excel Document" ajax="false">
        <p:dataExporter type="xls" target="gridRPBDetails" 
            fileName="#{tInputBean.exportFilename}" />
    </p:commandButton>
    

    The CSS :

    .ui-state-default .ui-icon-xls {
        background-image: url(images/excel_small.png);
    }
    

    And here is the generated html :

    <button type="submit" title="Excel Document" onclick=";" 
      name="gridRPBDetails:j_idt81" id="gridRPBDetails:j_idt81" 
      class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only" 
      role="button" aria-disabled="false">
        <span class="ui-button-icon-primary ui-icon ui-icon-xls"></span>
        <span class="ui-button-text">ui-button</span>
    </button>
    

    Thank you !

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

Sidebar

Related Questions

Just a basic html link question. I have an intranet setup, and I need
Seems so basic, I can't believe I don't know this! I just need a
I created just the most basic WCF Service Application to do some prototyping, but
I am trying to just create a basic layout, but i am having trouble
I know this sounds confusing: I have just built some basic prev/next pagination for
I just moved over to the Visual Basic team here at work. What is
This is a very basic concept, but something I have never been able to
Well, I completely get the most basic datatypes of C, like short, int, long,
I'm not doing any fancy route patterns yet, just the basic controller, action, id
I just had some basic php questions to further my understanding as I learn,

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.