af:inputFile 没有调用 valueChangeListener 方法

编程入门 行业动态 更新时间:2024-10-23 13:38:08
本文介绍了af:inputFile 没有调用 valueChangeListener 方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

总结问题

我正在尝试将图像上传到数据库中的 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 the ADF_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 方法

本文发布于:2023-11-26 21:02:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635186.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   af   inputFile   valueChangeListener

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!