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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:59:47+00:00 2026-06-17T16:59:47+00:00

I have a <p:download> like this: <h:form id=form1> <p:commandButton id=downloadLink value=Download ajax=false onclick=PrimeFaces.monitorDownload(start, stop)

  • 0

I have a <p:download> like this:

<h:form id="form1">
    <p:commandButton id="downloadLink" value="Download" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop)"   
        icon="ui-icon-arrowthichk-s" actionListener="#{search.downloadActionListener}">   
        <p:fileDownload value="#{search.dwnloadFile}" />  
    </p:commandButton> 
</h:form>

It doesn’t work. The download button just reloads the page and doesn’t show the Save As dialog. After checking every single thing, I came to know that if I remove the <h:head> tag from the page, then it starts to work.

I can’t work without <h:head> as PrimeFaces look’n’feel and all ajax functionality depends on it.


Update: the generated HTML <head> with <h:head> is like this:

<head>
    <link href="/Project2.0/javax.faces.resource/themes/sam/theme.css.xhtml?ln=icefaces.ace" rel="stylesheet" type="text/css" />
    <link href="/Project2.0/rfRes/skinning.ecss.xhtml?db=eAG7mShzEgAFjAIg" rel="stylesheet" type="text/css" />
    <link href="/Project2.0/javax.faces.resource/primefaces.css.xhtml?ln=primefaces" rel="stylesheet" type="text/css" />
    <script src="/Project2.0/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces" type="text/javascript"></script>
    <script src="/Project2.0/javax.faces.resource/primefaces.js.xhtml?ln=primefaces" type="text/javascript"></script>
    <link href="/Project2.0/javax.faces.resource/dock/dock.css.xhtml?ln=primefaces" rel="stylesheet" type="text/css" />
    <script src="/Project2.0/javax.faces.resource/dock/dock.js.xhtml?ln=primefaces" type="text/javascript"></script>
    <link href="/Project2.0/javax.faces.resource/layout/layout.css.xhtml?ln=primefaces" rel="stylesheet" type="text/css" />
    <script src="/Project2.0/javax.faces.resource/layout/layout.js.xhtml?ln=primefaces" type="text/javascript"></script>
    <script src="/Project2.0/javax.faces.resource/jsf.js.xhtml?ln=javax.faces" type="text/javascript"></script>
    <script src="/Project2.0/javax.faces.resource/icepush.js.xhtml?v=9261182" type="text/javascript"></script>
    <script src="/Project2.0/javax.faces.resource/bridge.js.xhtml?v=9261182" type="text/javascript"></script>
    <script type="text/javascript">document.documentElement.isHeadUpdateSuccessful=true;</script>
    <style type="text/css">.ice-blockui-overlay {position: absolute;background-color: white;z-index: 28000;opacity: 0.22;filter: alpha(opacity = 22);}.ice-status-indicator-overlay {position: absolute;background-color: white;z-index: 28000;opacity: 0.22;filter: alpha(opacity = 22);}</style>
    <script src="/Project2.0/javax.faces.resource/compat.js.xhtml" type="text/javascript"></script>
    <script src="/Project2.0/javax.faces.resource/icefaces-compat.js.xhtml" type="text/javascript"></script>
    <title>
        Project
    </title>
    <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" />
</head>

and without <h:head> it’s like this:

<head>
    <title>
        Project
    </title>
    <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" />
</head>
  • 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-17T16:59:48+00:00Added an answer on June 17, 2026 at 4:59 pm

    The HTML output of the <h:head> suggests that you’re mixing PrimeFaces with ICEfaces. The main cause of your concrete problem is this script from ICEfaces:

    <script src="/Project2.0/javax.faces.resource/icefaces-compat.js.xhtml" type="text/javascript"></script>
    

    This basically turns every non-ajax submit button into an ajax submit button. This also includes the download button. But you cannot download files with ajax.

    Remove ICEfaces altogether. You don’t need it. It’s basically a clone of PrimeFaces 2.x. But if you’re already using PrimeFaces 3.x, then ICEfaces has utterly no additional value. Perhaps it was a leftover from previous experimenting with various JSF component libraries.

    See also:

    • ICEfaces libary in classpath prevents Save As dialog from popping up on file download

    Unrelated to the concrete problem, the HTML output also suggests that you’re also having RichFaces in the runtime classpath. Whilst that should theoretically work fine together with PrimeFaces, I wouldn’t recommend mixing them. RichFaces has in essence nothing which PrimeFaces doesn’t already offer.

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

Sidebar

Related Questions

I have this: <form action='/ltsp' method='GET'> <label>Download Option:</label> <select name=''> <option name='download' value='download'>download</option> <option
The workflow is like this: we download a template form, prefill values which will
When I have download sample code from this link and than try to build
In my .aspx page, I have download button which onclick download the .apk file.
I have already download and install this package to support HTML5 input type http://support.microsoft.com/kb/2468871
i have printer status reports sent on my email. i would like to download
I have a button [Download Document] which does these two things: Makes an ajax
can anyone please help. i have this login form: <form id=myform form action=login.php method=post
Right now my CSS files look like this: Then I have a php snippet
I have this Jquery AJAX request to process the creation of Word documents (using

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.