h:onTelick(IE)后,inputText不会动态更改'value'

时间:2015-03-27 03:11:17

标签: javascript richfaces

我试图在文件上载后将文本文件填充到h:inputText值。几个小时,我没有成功地提供解决方案。代码适用于FF36,Safari,GC。

<ui:composition>

    <h:outputLabel styleClass="tab-label" value="Data Filename to Upload : " />                 

    <h:inputText id="#{fileID.concat('FileName')}" type="text" class="form-text" value="#{searchesPageBean.searchBean.file.name}" readonly="true" /> 

    <input type="button" class="filter-btn browse-btn" value="Browse" 
        onclick="clickBrowse(#{'\''.concat(fileID).concat('\'')});" >
    </input>

    <div style="opacity: 0; height: 0px; visibility: hidden; width: 0px; z-index: " >
        <rich:fileUpload id="#{fileID.concat('FileUpload')}"  
            fileUploadListener="#{searchesPageBean.searchBean.listener}"
            maxFilesQuantity="#{searchesPageBean.searchBean.uploadsAvailable}"
            immediateUpload="#{searchesPageBean.searchBean.autoUpload}"
            acceptedTypes="txt"
            autoclear="true" 
            ajaxSingle="true">
            <a4j:support event="onuploadcomplete" reRender="#{fileID.concat('FileUpload,').concat(fileID.concat('FileName, ').concat(fileID.concat('ViewFileName,')))}"
                ajaxSingle="true" limitToList="true" 
                action="#{searchesPageBean.searchBean.clearUploadData()}" />
        </rich:fileUpload>                  
    </div>

</ui:composition>
到目前为止我尝试过的事情:

  • <meta http-equiv="X-UA-Compatible" content="IE=8" />
  • 删除readonly=true
  • onsubmit=true放在<input type>

真的非常需要这个。谢谢

0 个答案:

没有答案