8 Replies Latest reply on Jun 2, 2010 1:51 PM by Nick Belaevski

    problem with richfaces file upload

    Erman bas Newbie

      i have rich:fileUpload and

      i can upload file succesfull

      problem is after upload while showing uploaded image

       

      i dont understand  the log

      WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /Corner, because request parameters have already been read, or ServletRequest.getReader() has already been called

      <h:panelGroup id="info"> not rerender didnt show the image

       

      <rich:fileUpload  fileUploadListener="#{kitapEkle.listener}"
                                                        maxFilesQuantity="#{kitapEkle.uploadsAvailable}"
                                                        id="upload"
                                                        immediateUpload="#{kitapEkle.autoUpload}"
                                                        acceptedTypes="jpg, gif, png, bmp" allowFlash="#{kitapEkle.useFlash}">>
                                          <a4j:support event="onuploadcomplete" reRender="info"/>
      </rich:fileUpload>

                                      <h:panelGroup id="info">
                                          <rich:panel bodyClass="info">
                                              <f:facet name="header">
                                                  <h:outputText value="Yuklenmis Resim" />
                                              </f:facet>
                                              <h:outputText value="No files currently uploaded"
                                                            rendered="#{kitapEkle.size==0}" />
                                              <rich:dataGrid columns="1" value="#{kitapEkle.files}"
                                                             var="file" rowKeyVar="row">
                                                  <rich:panel bodyClass="rich-laguna-panel-no-header">
                                                      <h:panelGrid columns="2">
                                                          <a4j:mediaOutput element="img" mimeType="#{file.mime}"
                                                                           createContent="#{kitapEkle.paint}" value="#{row}"
                                                                           style="width:100px; height:100px;" cacheable="false">
                                                              <f:param value="#{kitapEkle.timeStamp}" name="time"/>
                                                          </a4j:mediaOutput>
                                                          <h:panelGrid columns="2">
                                                              <h:outputText value="File Name:" />
                                                              <h:outputText value="#{file.name}" />
                                                              <h:outputText value="File Length(bytes):" />
                                                              <h:outputText value="#{file.length}" />
                                                          </h:panelGrid>
                                                      </h:panelGrid>
                                                  </rich:panel>
                                              </rich:dataGrid>
                                          </rich:panel>
                                          <rich:spacer height="3"/>
                                          <br />
                                          <a4j:commandButton action="#{kitapEkle.clearUploadData}"
                                                             reRender="info, upload" value="Clear Uploaded Data"
                                                             rendered="#{kitapEkle.size>0}" />