rich:fileUpload large file uploads > 500 MB a4j:support even
ravindra.bagali Oct 15, 2008 5:27 PMHi,
I am using rich:fileUpload in our application and when i upload large files > 700 MB the a4j:support event="onuploadcomplete" is not triggered. When i manually refresh, the whole the view is rendered.
Works fine in Firefox.
Richfaces version: 3.2.1 GA
Issues Found in: IE6 & 7.
Any help greatly appreciated. Thanx in advance.
My code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/layout/tnav_layout.jspx">
<ui:define name="title"> Manual Page</ui:define>
<ui:define name="head-extra">
</ui:define>
<ui:define name="nav-opt">
<c:set var="navmenu" value="datalink-homepage" />
</ui:define>
<ui:define name="pageContent">
<f:view>
<h:form id="datalinkForm">
<h:panelGrid id="tableGrid12" columns="1">
<rich:messages styleClass="warning" layout="list" level="ERROR"
showSummary="false" showDetail="true" />
<rich:message for="submitSearchButton" showDetail="false"
showSummary="true" infoLabelClass="infoMessage"
fatalLabelClass="fatalMessage" errorLabelClass="errorMessage" />
</h:panelGrid>
<!-- <h:outputText value="User Information" styleClass="sectionLabel" /> -->
<h3>User Information</h3>
<h:panelGrid id="tableGrid" columns="2">
<h:panelGroup>
<h:outputLabel id="CompanyLabel" value="Company" for="company"
styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<a4j:region>
<t:selectOneMenu id="company"
value="#{PostingBean.filter.selectOneMenuCompanyName}"
valueChangeListener="#{PostingBean.companyChangeListener}">
<f:selectItems value="#{PostingBean.companyList}" />
<a4j:support event="onchange"
reRender="editCompanyLinkPanel,emailSubjectInput,contacts,loginId,country,updateUserLinkPanel" />
</t:selectOneMenu>
</a4j:region>
<rich:message for="company"
errorClass="defaultPadding errorMessage" showSummary="true"
showDetail="false" />
<h:panelGroup id="editCompanyLinkPanel">
<h:commandButton id="editcompanyLink" value="Edit Company"
rendered="#{!empty PostingBean.filter.selectOneMenuCompanyName}"
styleClass="defaultPadding buttonlink"
action="#{PostingBean.linkCompanyEdit}"
onmouseover="style.color='red'"
onmouseout="style.color='#007593'">
<a4j:actionparam name="companyModelShow" value="true"
assignTo="#{PostingBean.showCompanyModal}" />
</h:commandButton>
<h:outputText value="Edit Company"
rendered="#{empty PostingBean.filter.selectOneMenuCompanyName}"
styleClass="defaultPadding disabledLink" />
</h:panelGroup>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel id="ContactsLabel" value="Contact(s)"
for="contacts" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<a4j:region>
<t:selectManyListbox id="contacts"
value="#{PostingBean.filter.contactName}"
valueChangeListener="#{PostingBean.contactsChangeListener}">
<f:selectItems value="#{PostingBean.userListDisplay}" />
<a4j:support event="onchange"
reRender="loginId,country,updateUserLinkPanel" />
</t:selectManyListbox>
</a4j:region>
<rich:message for="contacts"
errorClass="defaultPadding errorMessage" showDetail="false"
showSummary="true" />
<h:commandButton id="createUserLink" value="Create User"
action="#{PostingBean.linkUserCreate}"
styleClass="defaultPadding buttonlink"
onmouseover="style.color='red'"
onmouseout="style.color='#007593'" />
<h:panelGroup id="updateUserLinkPanel">
<h:commandButton id="updateUserLink" value="Update User"
action="#{PostingBean.linkUserUpdate}"
rendered="#{!PostingBean.filter.disableUpdateUserLink}"
styleClass="defaultPadding buttonlink"
onmouseover="style.color='red'"
onmouseout="style.color='#007593'" />
<h:outputText value="Update User"
rendered="#{PostingBean.filter.disableUpdateUserLink}"
styleClass="defaultPadding disabledLink" />
</h:panelGroup>
</h:panelGroup>
<h:outputLabel id="loginIdLabel" value="Login Id" for="loginId"
styleClass="inputLabel" />
<h:inputText id="loginId" value="#{PostingBean.filter.loginId}"
readonly="true" size="50" styleClass="readonly" />
<h:outputLabel id="countryLabel" value="Country" for="country"
styleClass="inputLabel" />
<h:inputText id="country" value="#{PostingBean.filter.country}"
readonly="true" size="50" styleClass="readonly" />
</h:panelGrid>
<!-- <h:outputText value="Please provide.." styleClass="sectionLabel" />
<h:outputText value=" " /> -->
<h3>Please provide..</h3>
<h:panelGrid id="tableGrid2" columns="2">
<h:panelGroup>
<h:outputLabel id="requestNumberLabel" value="Request Number"
for="requestNumber" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<h:inputText id="requestNumber"
value="#{PostingBean.filter.requestNum}" maxlength="25">
</h:inputText>
<rich:message for="requestNumber"
errorClass="defaultPadding errorMessage" showDetail="false"
showSummary="true" />
</h:panelGroup>
<h:panelGroup>
<h:outputLabel id="inputcalendarLabel"
value="Expiration Date (mm/dd/yyyy)" for="inputcalendar"
styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<rich:calendar id="inputcalendar"
value="#{PostingBean.filter.requestDate}"
datePattern="MM/dd/yyyy" locale="getDefaultLocale()"
popup="true" />
<rich:message for="inputcalendar"
errorClass="defaultPadding errorMessage" showDetail="false"
showSummary="true" />
</h:panelGroup>
<h:panelGroup>
<h:outputLabel id="uploadfilelabel" value="Upload Files"
styleClass="inputLabel" for="uploadfiles" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup id="uploadfiles">
<rich:dataTable id="m_upload_f_list"
value="#{PostingBean.mfileuploadlist}" var="m_file"
rowKeyVar="row" width="665">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText value="#" />
</rich:column>
<rich:column>
<h:outputText value="Filename" />
<h:outputText value="*" styleClass="inputLabel required" />
</rich:column>
<rich:column>
<h:outputText value="Item Number" />
<h:outputText value="*" styleClass="inputLabel required" />
</rich:column>
<rich:column>
<h:outputText value="Revision" />
<h:outputText value="*" styleClass="inputLabel required" />
</rich:column>
<rich:column>
<h:outputText value="ECCN" />
<h:outputText value="*" styleClass="inputLabel required" />
</rich:column>
<rich:column>
<h:outputText value="Description" />
</rich:column>
<rich:column>
<h:outputText value="Action" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<h:outputText id="id" value="#{row+1}" />
</rich:column>
<rich:column id="m_filename">
<h:inputText id="filename" value="#{m_file.filename}">
</h:inputText>
</rich:column>
<rich:column id="m_itemnumber">
<h:inputText id="itemNumber" value="#{m_file.itemNum}">
</h:inputText>
</rich:column>
<rich:column id="m_revision">
<h:inputText id="revision" value="#{m_file.revision}"
maxlength="1" size="1">
</h:inputText>
</rich:column>
<rich:column id="m_eccn">
<h:inputText id="eccn" value="#{m_file.eccn}" size="10"
maxlength="50">
</h:inputText>
</rich:column>
<rich:column id="m_desc">
<h:inputText value="#{m_file.desc}" maxlength="500" />
</rich:column>
<rich:column>
<a4j:commandLink id="m_itemremove"
actionListener="#{m_file.remove}" value="Remove"
reRender="m_upload_f_list" />
</rich:column>
<f:facet name="footer">
<rich:fileUpload id="aa_upload" maxFilesQuantity="100" fileUploadListener="#{PostingBean.fileUploadListener}" immediateUpload="true" listHeight="0px" listWidth="100%">
<a4j:support event="onuploadcomplete" reRender="m_upload_f_list" />
</rich:fileUpload>
</f:facet>
</rich:dataTable>
<rich:message for="m_upload_f_list" showDetail="false"
showSummary="true" infoLabelClass="infoMessage"
fatalLabelClass="fatalMessage" errorLabelClass="errorMessage" />
</h:panelGroup>
</h:panelGrid>
<h3>Email Information</h3>
<h:panelGrid id="emailGrid" columns="2">
<h:outputLabel id="emailsubjectLabel" value="Email Subject"
for="emailSubjectInput" styleClass="inputLabel" />
<h:inputText id="emailSubjectInput"
value="#{PostingBean.filter.emailSubject}" size="50"
maxlength="255" />
<h:outputLabel id="commentsLabel"
value="Comments (500 Charecter Max)" for="comments"
styleClass="inputLabel" />
<h:outputText value="Â " />
<h:panelGroup>
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
// Theme options
plugins : "safari,style,table,advhr,advlink,inlinepopups,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,pagebreak",
theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,link,unlink,|,tablecontrols,|,preview,code,fullscreen",
theme_advanced_buttons2 : "formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,blockquote,|,forecolor,backcolor",
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap,advhr,|,ltr,rtl,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreakingpagebreak,cleanup,help|,insertdate,inserttime,|",
theme_advanced_toolbar_align : "left",
theme_advanced_toolbar_location : "top",
height : "180",
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
convert_urls : "false",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
function toggleEditorView(id) {
if (!tinyMCE.getInstanceById(id)){
tinyMCE.execCommand('mceAddControl', false, id);
}
}
function toggleTextView(id) {
if (tinyMCE.getInstanceById(id)){
tinyMCE.execCommand('mceRemoveControl', false, id);
}
}
function disableButtons()
{
document.getElementById('editcompanyform:canceleditcompany').disabled=true;
document.getElementById('editcompanyform:canceleditcompany').className='buttondisabled';
document.getElementById('editcompanyform:saveeditcompany').disabled=true;
document.getElementById('editcompanyform:saveeditcompany').className='buttondisabled';
document.getElementById('userForm:saveUser').disabled=true;
document.getElementById('userForm:saveUser').className='buttondisabled';
document.getElementById('userForm:cancelUser').disabled=true;
document.getElementById('userForm:cancelUser').className='buttondisabled';
document.getElementById('datalinkForm:submitSearchButton').disabled=true;
document.getElementById('datalinkForm:submitSearchButton').className='buttondisabled';
document.getElementById('datalinkForm:resetSearchButton').disabled=true;
document.getElementById('datalinkForm:resetSearchButton').className='buttondisabled';
}
function activateButtons()
{
document.getElementById('editcompanyform:canceleditcompany').disabled=false;
document.getElementById('editcompanyform:canceleditcompany').className='buttoncancle';
document.getElementById('editcompanyform:saveeditcompany').disabled=false;
document.getElementById('editcompanyform:saveeditcompany').className='buttonnormal';
document.getElementById('userForm:saveUser').disabled=false;
document.getElementById('userForm:saveUser').className='buttonnormal';
document.getElementById('userForm:cancelUser').disabled=false;
document.getElementById('userForm:cancelUser').className='buttoncancel';
document.getElementById('datalinkForm:submitSearchButton').disabled=false;
document.getElementById('datalinkForm:submitSearchButton').className='buttonnormal';
document.getElementById('datalinkForm:resetSearchButton').disabled=fa;se;
document.getElementById('datalinkForm:resetSearchButton').className='buttoncancel';
}
<h:inputTextarea id="comments"
value="#{PostingBean.filter.comments}" cols="80" rows="5">
<a4j:support event="onchange" reRender="comments" />
</h:inputTextarea>
</h:panelGroup>
<f:facet name="footer">
<h:panelGrid columns="1" styleClass="progressStatusGrid">
<a4j:status id="mainstatus" startText="In progress..."
stopText="" startStyleClass="startStatus" />
</h:panelGrid>
<h:panelGroup styleClass="buttonPanel">
<h:commandButton id="submitSearchButton"
action="#{PostingBean.onSubmit}" value="Submit" type="submit"
styleClass="buttonnormal" />
<h:commandButton id="resetSearchButton"
action="#{PostingBean.onReset}" value="Reset" immediate="true"
styleClass="buttoncancel" />
</h:panelGroup>
</f:facet>
</h:panelGrid>
</h:form>
<!-- Edit Company Modal Panel -->
<rich:modalPanel id="editcompanypanel" height="160" width="350"
zindex="100" showWhenRendered="#{PostingBean.showCompanyModal}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Edit Company" />
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:form id="editcolsecompanyform" ajaxSubmit="true">
<a4j:commandButton image="../images/modal/ico_close.gif"
action="#{PostingBean.onCancelCompany}" immediate="true">
</a4j:commandButton>
</a4j:form>
</h:panelGroup>
</f:facet>
<a4j:form id="editcompanyform" ajaxSubmit="true">
<h:panelGrid id="editCompanyPanelList" columns="2"
styleClass="zborder">
<h:outputLabel id="editCompanyPanelLabel" value="Company"
for="editCompany" styleClass="defaultPadding inputLabel" />
<h:inputText id="editCompany"
value="#{PostingBean.editCompanyModalFilter.companyName}"
size="20" readonly="true" styleClass="readonly" />
<h:panelGroup>
<h:outputLabel id="newCompanyPanelLabel" value="New name"
for="newCompany" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGrid columns="1" styleClass="noBorder">
<h:inputText id="newCompany"
value="#{PostingBean.editCompanyModalFilter.editedCompanyName}"
size="34" maxlength="128" required="true"
validator="#{PostingBean.validateSpecialCharacters}" />
<rich:message for="newCompany"
errorClass="defaultPadding errorMessage" />
</h:panelGrid>
</h:panelGrid>
<h:panelGroup id="companybuttonpanel" styleClass="buttonPanel">
<a4j:commandButton id="saveeditcompany" value="Save"
onclick="disableButtons();" oncomplete="activateButtons();"
styleClass="buttonnormal" action="#{PostingBean.onSaveCompany}">
<a4j:support event="onchange"
reRender="company, emailSubjectInput" />
</a4j:commandButton>
<a4j:commandButton id="canceleditcompany" value="Close"
onclick="disableButtons();" oncomplete="activateButtons();"
styleClass="buttoncancel"
action="#{PostingBean.onCancelCompany}" immediate="true" />
</h:panelGroup>
<h:panelGrid id="errorEditCompanyPanel" columns="1">
<rich:message for="saveeditcompany" showDetail="false"
showSummary="true" infoLabelClass="infoMessage"
fatalLabelClass="fatalMessage" errorLabelClass="errorMessage" />
</h:panelGrid>
</a4j:form>
</rich:modalPanel>
<!-- Create/Update User panel Form -->
<rich:modalPanel id="usermodalpanel" height="340" width="500"
zindex="100" showWhenRendered="#{PostingBean.showUserModal}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{PostingBean.userModalTitle}"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:form id="editcolseuserform" ajaxSubmit="true">
<a4j:commandButton image="../images/modal/ico_close.gif"
action="#{PostingBean.onCancelUser}" immediate="true">
</a4j:commandButton>
</a4j:form>
</h:panelGroup>
</f:facet>
<a4j:form id="userForm" ajaxSubmit="true">
<t:selectOneRadio id="companyoption"
value="#{PostingBean.companySelected}" layout="spread" border="1"
styleClass="radio" required="true"
validator="#{PostingBean.validateUserCompany}">
<f:selectItem itemValue="typedCompanyName" itemLabel="" />
<f:selectItem itemValue="selectedCompanyName" itemLabel="" />
</t:selectOneRadio>
<h:panelGrid id="usereditpanel" columns="2">
<h:panelGroup>
<h:outputLabel id="usercompanyLabel" value="Company"
for="usercompanyName" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGrid columns="2">
<h:panelGrid columns="2">
<t:radio for="companyoption" index="0" />
<t:inputText id="usercompanyName"
value="#{PostingBean.modalFilter.companyName}" maxlength="128" />
<t:radio for="companyoption" index="1" />
<t:selectOneMenu id="usercompanyNameList"
value="#{PostingBean.modalFilter.selectOneMenuCompanyName}">
<f:selectItems value="#{PostingBean.companyList}" />
</t:selectOneMenu>
</h:panelGrid>
<rich:message for="companyoption"
errorClass="defaultPadding errorMessage" />
</h:panelGrid>
<h:panelGroup>
<h:outputLabel id="usercountryLabel" value="Country"
for="usercountryList" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<t:selectOneMenu id="usercountryList"
value="#{PostingBean.modalFilter.country}" required="true">
<f:selectItems value="#{PostingBean.countryListDisplay}" />
</t:selectOneMenu>
<rich:message for="usercountryList"
errorClass="defaultPadding errorMessage" />
</h:panelGroup>
<h:panelGroup>
<h:outputLabel id="userlastnamelabel" value="Last Name"
for="userlastName" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<t:inputText id="userlastName"
value="#{PostingBean.modalFilter.lastName}" maxlength="80"
required="true"
validator="#{PostingBean.validateSpecialCharacters}" />
<rich:message for="userlastName"
errorClass="defaultPadding errorMessage" />
</h:panelGroup>
<h:panelGroup>
<h:outputLabel id="userfirstnamelabel" value="First Name"
for="userfirstName" styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGroup>
<t:inputText id="userfirstName"
value="#{PostingBean.modalFilter.firstName}" maxlength="80"
required="true"
validator="#{PostingBean.validateSpecialCharacters}" />
<rich:message for="userfirstName"
errorClass="defaultPadding errorMessage" />
</h:panelGroup>
<h:outputLabel id="usermiddlenamelabel" value="Middle Name"
for="usermiddleName" styleClass="inputLabel" />
<t:inputText id="usermiddleName"
value="#{PostingBean.modalFilter.middleName}" maxlength="80" />
<h:panelGroup>
<h:outputLabel id="useremaillabel" value="Email" for="userEmail"
styleClass="inputLabel" />
<h:outputText value="*" styleClass="inputLabel required" />
</h:panelGroup>
<h:panelGrid columns="1">
<h:panelGroup>
<t:inputText id="userEmail"
value="#{PostingBean.modalFilter.email}" size="32"
maxlength="80" required="true"
validator="#{PostingBean.validateEmailAddress}" />
<rich:message for="userEmail"
errorClass="defaultPadding errorMessage" />
</h:panelGroup>
<h:outputText value="(User's ID will be 'cm_'+ Email)" />
</h:panelGrid>
</h:panelGrid>
<h:panelGroup styleClass="buttonPanel">
<a4j:commandButton id="saveUser" value="Save"
onclick="disableButtons();" oncomplete="activateButtons();"
styleClass="buttonnormal" reRender="userMsg"
action="#{PostingBean.onSaveUser}">
</a4j:commandButton>
<a4j:commandButton id="cancelUser" value="Close"
onclick="disableButtons();" oncomplete="activateButtons();"
styleClass="buttoncancel" action="#{PostingBean.onCancelUser}"
immediate="true" />
</h:panelGroup>
<h:panelGrid id="errorEditUserPanel" columns="1">
<rich:message for="saveUser" showDetail="false"
showSummary="true" infoLabelClass="infoMessage"
fatalLabelClass="fatalMessage" errorLabelClass="errorMessage" />
</h:panelGrid>
</a4j:form>
</rich:modalPanel>
</f:view>
</ui:define>
</ui:composition>
</jsp:root>
Bean Code: