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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:45:48+00:00 2026-06-12T17:45:48+00:00

In my JSF 2.0 – Primefaces application I am using I DO NOT want

  • 0

In my JSF 2.0 – Primefaces application I am using I DO NOT want to have

  1. progress bar
  2. upload button
  3. cancel button
    which shows up adjacent to the selected image(once the image is selected)

Another issue is the ‘fileLimit’ I want to set it to 1 but when I do that it says invalid attribute.

Here is my code:

<p:fileUpload id="related_image" fileUploadListener="#{fileUploadController.handleFileUpload}"  
        mode="advance"  
        auto="false" 
        showButtons="false"
        sizeLimit="100000"
        fileLimit ="1"
        allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
        style="width: 310px"/>
  • 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-12T17:45:49+00:00Added an answer on June 12, 2026 at 5:45 pm

    Basically all you have to do is to assign find out the right css selectors and set them with display:none; (put them in your .css file and include it with <h:outputStylesheet)

    in general (in css you need to escape the colon with \3a Handling a colon in an element ID in a CSS selector , while in jquery you should use \\:)

    #some_prefix_id\3a your_file_upload_component_id .someClass{
        display:none;
    }
    

    where the some_prefix_id might be some form id or some naming
    container id ,

    or (sometimes there is no prefix before your_file_upload_component_id )

    #your_file_upload_component_id .someClass{
        display:none;
    }
    

    Although , INMO , best approach would be assigning an id to your form and using this selector in css :

    #your_form_id .someClass{
        display:none;
    }
    

    Now to the exact selectors…

    so to remove the upload button

    #related_image .start{
        display:none;
    }
    

    or if you want to do the same with jquery

    $("#related_image .start").hide();
    

    to remove the cancel button which shows up adjacent to the selected image(once the image is selected)

    #related_image .cancel{
        display:none;
    }
    

    or if you want to do the same with jquery

    $("#related_image .cancel").hide();
    

    to remove progress bar

    #related_image .progress{
        display:none;
    }
    

    or if you want to do the same with jquery

    $("#related_image .progress").hide();
    

    You can test the jquery approach on primefaces showcase if you want , just replace the #related_image with #j_idt19\\:j_idt20 for example $("#j_idt19\\:j_idt20 .start").hide();


    There is no such attribute as fileLimit take a look at the Tag fileUpload

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

Sidebar

Related Questions

I'm using JSF templates and Primefaces. Javascript code does not seem to be working
(Using jsf-2) I have a dataTable with one column which can be edited: <h:column>
In JSF 1.2 and I'm using h:commandButton type=button but the button does not trigger
In JSF + RichFaces, I have an inputText and a button, How can I
We have a JSF 1.2 application with RichFaces 3.3.3 on JBoss 5.1. When we
I have imported a JSF/Facelets project from SVN into Netbeans. Any change which I
In JSF, I am using panelGrid which is equivalent to table in html. How
I am using jsf reach faces in one application. I am using rich:modalPanel for
JSF 2.0, Primefaces 3.1.1 I have two p:selectOneRadio components: <p:selectOneRadio id=radio1 value=#{inningBean.lastDeliveryType}> <f:selectItem itemLabel=Wide
Using jsf I want to edit a employee profile, when user will click on

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.