问题描述
总结问题
我正在尝试将图像上传到数据库中的 blob,并且一直在关注各种在线博客以实现此目的.
I'm trying to upload an image to a blob in the database and have been following various blogs online to do so.
提供背景信息,包括您已经尝试过的内容
我尝试将输入文件包含在表单中,但收到警告:-每页仅支持一个 af:form.此警告稍后升级为服务器异常错误,我无法进入该页面.
I've tried enclosing the input file on a form but I get the warning:-"Only one af:form is supported per page. This warning later escalates to a server exception error and I can't enter said page.
显示一些代码
<af:panelFormLayout id="pfl1">
<f:facet name="footer"/>
<af:form id="f1" usesUpload="true">
<af:inputFile label="Label 1" id="if1" value="#NewUploadImageBean.file}"
valueChangeListener="#{NewUploadImageBean.upLoadValueChangeListener}"/>
</af:form>
</af:panelFormLayout>
我在整个页面中只有这个表单.
I only have this one form in the entire page.
描述预期和实际结果,包括任何错误消息
希望 valueChangeListner 调用我的方法.目前我得到ADF_FACES-60097 错误,然后转换为:java.lang.IllegalStateException:ADF_FACES-30124:在 viewId 上检测到多个表单:/test_pages/employement.jsf.富客户端目前在处理多种表单方面存在一些限制.
Would like to the valueChangeListner to call my method. Currently I get theADF_FACES-60097 error which then translates to : java.lang.IllegalStateException: ADF_FACES-30124:Multiple forms detected on viewId: /test_pages/employement.jsf. Rich client currently has some limitations in dealing with multiple forms.
推荐答案
如何修复 ADF_FACES-30124:在 viewId 上检测到多个表单?
为此,请删除 jsf 视图中的所有 af:forms,特别是包含 inputFile 的那个,并在最高视图标记级别仅添加一个 af:form useupload="true" :
To do so remove all the af:forms inside your jsf view expecially the one containing your inputFile and add only one af:form useupload="true" at the highest view tag level :
<af:document >
<af:form usesUpload="true" id="f1">
... ALL YOUR VIEW TAGS ...
</af:form>
</af:document>
这篇关于af:inputFile 没有调用 valueChangeListener 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!