2 Replies Latest reply on Sep 4, 2009 7:29 AM by damian.sinczak

    a4j:support in rich:fileUpload desn't work

    damian.sinczak

      Hi,

      I have problem with refreshing page after file upload is compleate. Upload works properly (i receive data in listener and process it) but after upload ends page doesn't refresh.

      <rich:fileUpload fileUploadListener="#{policiesBean.listener}" maxFilesQuantity="1" id="upload" immediateUpload="false" acceptedTypes="class, jar" allowFlash="true" listHeight="60" listWidth="577" sizeErrorLabel="Too big file size. Check upload settings." transferErrorLabel="Error during file upload. Clear and try again." style="align:center;width:420px;">
       <f:facet name="label">
       <h:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}" />
       </f:facet>
       <a4j:support event="onuploadcomplete" reRender="uploadInfo" />
      </rich:fileUpload>
      


      where upload info id panel group component.

      For now I don't care how the page will reload. I jus want it to reload after upload is compleate. Please tell me how to do it.

        • 1. Re: a4j:support in rich:fileUpload desn't work
          ilya_shaikovsky

          and what about update panel itself? please show its content also.

          • 2. Re: a4j:support in rich:fileUpload desn't work
            damian.sinczak

            I've tried this already. I gaved panel some ids and tried to reRender them but this solution also failed.

            This is the panel grou that shoulod be refreshed.

            <h:panelGroup id="uploadInfo" rendered="#{policiesBean.uploadedData != null}">
             <rich:panel header="Uploaded policy info" style="margin-right:auto;margin-left:auto;width:600px;">
             <h:panelGrid border="0" columns="2">
             <h:outputText style="font-size: 12px;" value="Policy name *: " />
             <h:inputText value="#{policiesBean.uploadedDataPolicyeName}" size="40" />
             <h:outputText style="font-size: 12px;" value="Policy file name: " />
             <h:outputText style="font-size: 12px;" value="#{policiesBean.uploadedDataFileName}" />
             <h:outputText style="font-size: 12px;" value="Policy file size: " />
             <h:outputText style="font-size: 12px;" value="#{policiesBean.uploadedDataFileSize} bytes" />
             </h:panelGrid>
             </rich:panel>
            
             <rich:spacer height="2" />
            
             <rich:panel style="margin-right:auto;margin-left:auto;width:600px;">
             <h:panelGrid border="0" columns="3">
             <h:commandButton value="Reset upload" id="resetPanel" action="#{policiesBean.resetUpload}">
             <a4j:support event="click" reRender="uploadPolicyPanel,pageForm" />
             </h:commandButton>
             <h:commandButton value="Save policy" id="savePolicy" action="#{policiesBean.savePolicy}">
             <a4j:support event="click" reRender="uploadPolicyPanel,pageForm" />
             </h:commandButton>
             </h:panelGrid>
             </rich:panel>
             <rich:spacer height="2" />
             <rich:panel style="margin-right:auto;margin-left:auto;width:600px;">
             <h:outputText style="font-size: 10px;"
             value="* If policy(s) with defined name already exists, is will be set inactive. Uploaded policy will have version greater by one." />
             </rich:panel>
             </h:panelGroup>