- 浏览: 1148885 次
- 性别:
- 来自: 火星郊区
博客专栏
-
OSGi
浏览量:0
文章分类
- 全部博客 (695)
- 项目管理 (48)
- OSGi (122)
- java (79)
- Vaadin (5)
- RAP (47)
- mysql (40)
- Maven (22)
- SVN (8)
- 孔雀鱼 (10)
- hibernate (9)
- spring (10)
- css (3)
- 年审 (6)
- ant (1)
- jdbc (3)
- FusionCharts (2)
- struts (4)
- 决策分析 (2)
- 生活 (10)
- 架构设计 (5)
- 破解 (2)
- 狼文化 (4)
- JVM (14)
- J2EE (1)
- 应用服务器 (1)
- 我的链接 (5)
- 数学 (2)
- 报表 (1)
- 百科 (6)
- Flex (7)
- log4j (2)
- PHP (1)
- 系统 (2)
- Web前端 (7)
- linux (6)
- Office (1)
- 安全管理 (5)
- python (2)
- dom4j (1)
- 工作流 (3)
- 养生保健 (4)
- Eclipse (8)
- 监控开发 (1)
- 设计 (3)
- CAS (1)
- ZK (41)
- BluePrint (3)
- 工具 (1)
- SWT (7)
- google (2)
- NIO (1)
- 企业文化 (2)
- Windoes (0)
- RCP (7)
- JavaScript (10)
- UML (1)
- 产品经理 (2)
- Velocity (10)
- C (1)
- 单元测试 (1)
- 设计模式 (2)
- 系统分析师 (2)
- 架构 (4)
- 面试 (2)
- 代码走查 (1)
- MongoDB (1)
- 企业流程优化 (1)
- 模式 (1)
- EJB (1)
- Jetty (1)
- Git (13)
- IPV6 (1)
- JQuery (8)
- SSH (1)
- mybatis (10)
- SiteMesh (2)
- JSTL (1)
- veloctiy (1)
- Spring MVC (1)
- struts2 (3)
- Servlet (1)
- 权限管理 (1)
- Java Mina (1)
- java 系统信息 (6)
- OSGi 基础 (3)
- html (1)
- spring--security (6)
- HTML5 (1)
- java爬虫搜索 (1)
- mvc (3)
最新评论
-
Tom.X:
http://osgia.com/
将web容器置于OSGi框架下进行web应用的开发 -
chenyuguxing:
你好, 为什么我的bundle export到felix工程中 ...
在Apache Felix中运行bundle -
string2020:
<niceManifest>true</ni ...
Bundle Plugin for Maven -
jsonmong:
OSGI,是未来的主流,目前已相当成熟。应用OSGI比较好的, ...
基于OSGi的声明式服务 -
zyhui98:
貌似是翻译过来的,有很少人在linux上做开发吧
如何成为“10倍效率”开发者
One of the new things in RAP 1.4 is the FileUpload widget in RWT, that replaces the old Upload widget from the sandbox. And there’s some more new upload stuff in the RAP Incubator. Here’s how to use the new features to upload files with RAP 1.4.
The FileUpload is a new widget that wraps the HTML file selection <input> tag. It looks like a button, and when it’s pressed, a native file dialog opens up that lets users select a file from their local file system. On file selection, a SelectionEvent will be fired. You can then programmatically upload the selected file to an http server using FileUpload.submit( URL ).
In order to receive and store the uploaded files on the server, you also need a server-side component. We created such an upload server component in the RAP Incubator. It’s called FileUploadHandler and it uses the Apache fileupload component internally. It’s included in the bundle org.eclipse.rap.rwt.supplemental.fileupload. This handler accepts file uploads to a certain URL (FileUploadHandler.getUploadUrl()) and delegates the data to a FileUploadReceiver. You can either use the provided DiskFileUploadReceiver or create your own receiver to do whatever you like with the uploaded data: put it into a database, or simple analyze the data and discard it.
Sounds complicated? Well, there’s a much easier way to upload files with RAP 1.4! We’ve encapsulated the entire upload process in an implementation of the SWT FileDialog, which is also available in the incubator.
To make it easy to use, we now provide an update site for the Incubator. To use the FileDialog in your application, all you have to do is to:
- include the bundles from the RAP Incubator repository http://download.eclipse.org/rt/rap/1.4/incubator/ in your RAP 1.4 target platform, and
- add a bundle dependency to org.eclipse.rap.rwt.supplemental.filedialog to your project (yes, you have to use Require-Bundle here because this bundle contributes a class to the org.eclipse.swt.widgets package, effectively creating a split-package ).
That’s all. Now you can use the FileDialog just like in SWT:
FileDialog fileDialog = new FileDialog( shell, SWT.TITLE | SWT.MULTI ); fileDialog.setText( "Upload Files" );? fileDialog.setAutoUpload( true ); // This API will change, see below! fileDialog.open(); String[] fileNames = fileDialog.getFileNames();
After uploading, the dialog closes and the variable fileNames contains the absolute file names of the uploaded files on the server’s file system. There’s an auto-upload feature that is really nice (I think it should be the default) – with autoUpload on, the upload starts immediately after file selection. A user can still press Cancel to prevent the application from using the uploaded files.
Note: Please note that this stuff is in the incubator and not part of the 1.4 release. The API and implementation may (and will) have to change and mature over time. However, if you use the latest version from 1.4/incubator site, you’ll always get a file dialog that will work with RAP 1.4. The server-side upload receiver and the required Apache bundles are also included.
We hope you enjoy these new features. Please try them out, tell us what you think, open bugs for the new stuff, and help us improving them.
Kudos to our new RAP committers Austin Riddle and Cole Markham who created this great new feature!
Update: I mistakenly left out the “.rwt.” from the bundle namespace in the original post, the bundle names are fixed now in the text.
Update: The 1.4 incubator repository has been updated with a newer version of the file dialog that is compatible with RAP 1.4. This update fixes the problem with missing file names mentioned in the comments.
发表评论
-
RCP开发者的好去处之ICON系列(持续更新中... ...)
2012-03-31 10:13 1121为了找个合适的图片是不是头大的不像样子了?OK,我现在就 ... -
RAP 整合 Spring (基于 Spring-osgi )
2012-03-31 10:12 1384RAP 介绍请见: http://www.eclipse. ... -
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
2012-03-25 14:50 1460引用 在rcp的路径添加了mysql驱动,并添加之cla ... -
解决JFace Dialog中ScrollComposite无法滚动
2012-03-26 10:26 1587今天写了一个Jface的dialog,作为配置界面,其中有 ... -
SWT实现弹出日历控件
2012-03-27 08:00 2579实现像网页上的那种用户单击一个Text框然后框下面出现一个日历 ... -
JFace进度条
2012-03-27 08:01 1111Java代码 someB ... -
getConfigurationElementsFor 无法获得扩展点的信息
2012-03-26 10:27 1091做项目的时候RCP程序在eclipse调试环境下面运行正常 ... -
测试rcp 和 rap 何时触发 组建.addListener(SWT.xxx, new Listener() )的方法
2012-02-24 14:22 1278Java代码 直接通过反射让组建监 ... -
RAP 界面显示不完全的问题
2012-02-24 14:22 1235rap运行第一刷新界面总是刷新不完整,组件错位,后台报Layo ... -
【RAP】CAS PIA 快速浏览入口地址
2012-02-07 08:23 1233下面的链接是访问RAP应用的入口。有2中方式,图片上已经注明。 ... -
RAP 与 RCP的区别
2012-02-07 08:23 1321RAP 可以让开发人员使用 JAVA API 和按照 E ... -
将Eclipse RAP部署到Tomcat中
2012-02-07 08:23 1137在上次成功将我的RCP项目迁移到浏览器中运行后,开始研究 ... -
RAP(Rich AJAX Platform)的可部署文件下载
2012-02-07 08:24 1137这是我自己做的RAP的可部署文件,可以下载下来解压到Tom ... -
Eclipse rcp/rap 开发经验总结(15) -rap如何使用js
2012-02-03 08:11 14411. 把输入的字符串当 javascript 执行 ... -
Eclipse rcp/rap 开发经验总结(14) -rap 图片、数据缓存处理
2012-02-03 08:10 1505一、概述 在进行了 rap 的基本学习之后,您对 rap ... -
Eclipse rcp/rap 开发经验总结(13) -Rap/Rcp保存按钮处理方式
2012-02-03 08:10 1078一、概述 在做项目的过程中,处理编辑区的保存机制的时候。发 ... -
Eclipse rcp/rap 开发经验总结(12) -Rap 优化之组件的销毁
2012-02-03 08:10 865一、概述 经过几个月的rap 项目实战,总结了一些小 ... -
Eclipse rcp/rap 开发经验总结(11) -rcp/rap与spring ibatis集成
2012-02-03 08:10 13081. rcp/rap 与 spring 集成 Activa ... -
Eclipse rcp/rap 开发经验总结(10) -Rap不同系统间的差异和处理方式
2012-02-01 08:01 1396平常进行 rap 程序开发一般都是在 win ... -
Eclipse rcp/rap 开发经验总结(9) - rap上传与下载
2012-02-01 08:01 1046一 上传 上传即将文件上传到服务器上,在客户端需 ...
相关推荐
标题中的“file-uploading-with-php-and-mysql.rar_file upload_truth5fw”暗示了这是一个关于使用PHP和MySQL实现文件上传功能的教程或代码示例。PHP是一种广泛使用的服务器端脚本语言,尤其适合Web开发,而MySQL是...
"Uploading and Viewing Files the Easy Way" 这个主题聚焦于简化这一过程的技术和最佳实践。我们将探讨如何实现高效、安全且用户体验良好的文件上传与查看功能。 首先,上传功能的核心在于前端和后端的交互。前端...
a highly efficient proprietary HttpModule, which enables uploading of files with size up to 2GB, while allocating a minimum amount of server memory. UI control for single- and multi-file uploads, ...
### SAP NetWeaver 04 Web Dynpro Java:文件上传与下载 #### 一、概述 在企业级应用开发中,文件的上传与下载是非常常见的功能需求之一。特别是在使用SAP NetWeaver 04平台进行开发时,利用Web Dynpro Java框架...
自述文件该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本系统依赖配置数据库创建数据库初始化如何运行测试套件服务(作业队列,缓存服务器,搜索引擎等) 部署说明...
• BIM Master provides users free Cloud storage•By uploading files through web, files are saved in your Cloud storage, you can access files from mobile devices •Once you make any changes on your ...
化妆品培训材料.pptx.baiduyun.uploading.cfg
Uploading Desktop
02 Select multiple files with the Ctrl/Command key 03 Download multiple files or a folder as single ZIP file 04 Clipboard for copying and moving multiple files 05 Easy to integrate and configure in...
化妆品工艺.pptx.baiduyun.uploading.cfg
from django.core.files.storage import default_storage def upload_file(request): if request.method == 'POST' and request.FILES['file']: file = request.FILES['file'] filename = default_storage.save...
目录 ... 你会建立什么 您将创建一个接受文件上传的Spring Boot Web应用程序。... 你需要什么 从Spring Initializr开始 如果使用Maven,请访问Spring Initializr以生成具有所需依赖项(Spring Web和Thymeleaf)的新项目...
Provides over 500 code examples, including real-world tasks such as creating an auto-login feature, sending HTML-formatted e-mail, testing password guessability, and uploading files via a web ...
Uploading files to remote pane by right-clicking the files in Windows shell. Subscribing to media files and publishing media files using the CutePODCast Manager. Finding files and folders using the ...
Chapter 10 - Uploading Files to Your Website Part IV - Getting to Know Your MySQL Database Chapter 11 - Establishing a Connection and Poking Around Chapter 12 - Creating a Database Table ...
Using SocketTools, you can easily add features such as uploading and downloading files, sending and retrieving e-mail, exchanging information with web servers, interactive terminal sessions and ...
• View, hexview, editing, downloading, uploading files • Working with zip archives (packing, unpacking) + compression tar.gz • Console • SQL Manager (MySql, PostgreSql) • Execute PHP code • Wo
Homepage for uploading files (IDEA AND "TODO") User login Able to chat with other logged in users upon request (group or "1v1"). Able to upload files to user-collection (can be private or public ...