简体   繁体   English

Richfaces 4.0中属性集中的题外话?

[英]Digression in the set of attributes in Richfaces 4.0?

I'm implementing file uploading using Richfaces version 4.0. 我正在使用Richfaces 4.0版实现文件上传。 I've noticed, that there is quite a big differences between rich:fileUpload component in version 3.2 and the one in the latest version . 我注意到, 3.2版中的 rich:fileUpload组件与最新版本中的rich:fileUpload组件有很大的区别。 As I see, there aren't possibility to set automatic uploading or limit number of downloaded files. 如我所见,无法设置自动上传或限制下载文件的数量。 I can't set auto clear option as well. 我也不能设置自动清除选项。 Am I right? 我对吗? Could you point the reason of this or suggest a solution? 您能否指出原因或提出解决方案? Thanks in advance 提前致谢

The maxFilesQuantity attribute was added as part of RichFaces 4.1.0.M3 (see RF-10996 ). maxFilesQuantity属性作为RichFaces 4.1.0.M3的一部分添加(请参阅RF-10996 )。

At the time of this answer, RichFaces 4.1.0.M4 is already available, so I'd recommend you use that instead. 在回答此问题时,RichFaces 4.1.0.M4已经可用,因此我建议您改用它。

If you are stuck on RichFaces 4.0.0.Final until 4.1.0.Final is released, you could use a fileUploadListener to count the number of files uploaded, and limit it that way. 如果在发布4.1.0.Final之前一直停留在RichFaces 4.0.0.Final上,则可以使用fileUploadListener来计数上传的文件数,并以此方式进行限制。

The main reason is that RichFaces guys have spent enormously a lot of time in migrating the component library from JSF 1.x to JSF 2.x. 主要原因是RichFaces成员花费了大量时间将组件库从JSF 1.x迁移到JSF2.x。 So some things have to be prioritized. 因此,必须优先处理某些事情。 In order to be "in time" with a JSF 2.0 compatible component library (to prevent users from changing the component library to another JSF 2.0 compatible one such as PrimeFaces; PrimeFaces for JSF 2.0 was already out half 2009 while RichFaces for JSF 2.0 was out by end of 2010 only, more than one year later!), they have scratched some hard-to-implement and/or least-used features for RichFaces 4.0 and postponed them for RichFaces 4.1 or later. 为了与JSF 2.0兼容的组件库“及时”(以防止用户将组件库更改为另一个与JSF 2.0兼容的组件库,例如PrimeFaces;针对JSF 2.0的PrimeFaces已经淘汰了2009年下半年,而针对JSF 2.0的RichFaces已经淘汰了仅在2010年底(一年多以后!)之前,他们为RichFaces 4.0抓了一些难以实现和/或最少使用的功能,并将它们推迟到RichFaces 4.1或更高版本上使用。 The Flash-based <rich:fileUpload> was one of them. 基于Flash的<rich:fileUpload>是其中之一。 It does now not use Flash anymore, but plain HTML/CSS/JS and hence the capabilities are very minimal. 现在,它不再使用Flash,而是使用纯HTML / CSS / JS,因此功能非常少。

Currently there are several rich:fileUpload feature and enhancement requests open for RF 4.1. 当前,有多个rich:fileUpload功能和针对RF 4.1的增强请求 There are plans to let it utilize HTML5 and XHR2 powers in the future. 有计划让它将来使用HTML5和XHR2功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM