RichFaces:从fileUpload提交inputText值

时间:2011-07-19 12:08:26

标签: java jsp richfaces form-submit

我有这个页面:

    <rich:modalPanel id="modalEditPanelId" resizeable="false"
        autosized="false" moveable="false" keepVisualState="false"
        width="300" height="130" showWhenRendered="true"
        rendered="#{myBean.renderedEdit}">
        <f:facet name="header">
            <h:outputText value="#{lang.cga_edit_title}" />
        </f:facet>
        <h:panelGrid columns="3" style="width: 60%">
            <h:outputText value="#{lang.cga_search_descr}" />
            <h:inputText value="#{myBean.datasetDescription}" />
            <rich:separator />
            <h:outputText value="#{lang.cga_edit_overwrite}" />
            <h:selectBooleanCheckbox value="#{myBean.overwrite}" />
            <rich:separator />
        </h:panelGrid>
        <h:panelGrid id="editButtons" columns="2">
            <a4j:commandButton id="modalEditBtnCancel"
                value="#{lang.msg_cancel}" reRender="modalEditPanelId, dataToShow">
                <f:setPropertyActionListener value="false"
                    target="#{class.renderedEdit}" />
            </a4j:commandButton>
            <rich:fileUpload id="uploadNewDataset" allowFlash="true"
                fileUploadListener="#{myBean.editXls}" acceptedTypes="xlsx"
                addControlLabel="#{lang.msg_import_input}"
                maxFilesQuantity="1">
                <a4j:support event="onuploadcomplete"
                    reRender="modalEditPanelId, dataToShow">
                    <f:setPropertyActionListener value="false"
                        target="#{myBean.renderedEdit}" />
                </a4j:support>
            </rich:fileUpload>
        </h:panelGrid>
    </rich:modalPanel>

当我点击fileUpload按钮时,显然没有提交字段datasetDescription和overwrite。 我还尝试在inputText上设置valueChangeListener,但是永远不会调用它。 如何在上传文件之前或之后将这些值保存在我的支持bean中?

0 个答案:

没有答案
相关问题