Errors with FileUpload
guarf Jun 23, 2008 8:24 PMI found some errors using FileUpload:
Apache log:
WARNING: Component formBody:j_id527 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation! Path to Component: {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /main.xhtml][Class: org.ajax4jsf.component.html.HtmlAjaxRegion,Id: bodyStatus][Class: org.ajax4jsf.component.html.AjaxForm,Id: formBody][Class: javax.faces.component.html.HtmlPanelGrid,Id: uploadPanelGrid][Class: org.richfaces.component.html.HtmlFileUpload,Id: upload][Class: org.richfaces.component.html.HtmlProgressBar,Id: j_id527]}
i dont know how to define the ID for the progressBar.
xhtml page:
<ui:composition> <f:loadBundle basename="com.planex.smsbroadcaster.messageresource.MessageResource" var="msg" /> <div class="menu_separator" /> <rich:spacer style="height:10px;" /> <h:panelGrid id="uploadPanelGrid" columns="2" columnClasses="top, top" > <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}" maxFilesQuantity="#{fileUploadBean.uploadsAvailable}" immediateUpload="#{fileUploadBean.autoUpload}" acceptedTypes="jpg, gif, png, bmp, txt" id="upload" listHeight="58px" listWidth="435px" <f:facet name="label"> <h:outputText value="{_KB}KB from {KB}KB uploaded - {mm}:{ss}" /> </f:facet> <a4j:support id="fileUploadSupport" event="onuploadcomplete" reRender="info" /> </rich:fileUpload> <h:panelGroup id="info"> <rich:panel bodyClass="info"> <h:outputText value="No file currently uploaded" rendered="#{fileUploadBean.size==0}" styleClass="outputText"/> <rich:dataGrid columns="1" value="#{fileUploadBean.files}" var="file" rowKeyVar="row"> <h:panelGrid columns="2"> <h:outputText value="File Name:" styleClass="outputText"/> <h:outputText value="#{file.name}" styleClass="outputText"/> <h:outputText value="File Length(bytes):" styleClass="outputText"/> <h:outputText value="#{file.length}" styleClass="outputText"/> </h:panelGrid> </rich:dataGrid> </rich:panel> <rich:spacer height="3"/> <br /> <a4j:commandButton action="#{fileUploadBean.clearUploadData}" reRender="info, upload,process" value="Clear Uploaded Data" rendered="#{fileUploadBean.size>0}" /> </h:panelGroup> </h:panelGrid> </ui:composition>
The other error is with IE, when I add the file (upload) it work OK, but the IE status still waiting for something :), i dont know what is.
Thx in advance.