JavaOne:JSF的进化——AJAX已经来了
2006-05-21 12:50
441 查看
最近在密切关注着JavaOne,EJB3的来临自然是头等大事,但是基于它的应用还不用着急。今天看到了关于JSF的报道,倒是值得拿来说说。来看看JSF最新基于AJAX的API,已经把AJAX简单地封装到底了:1.自动填表栏代码:<ui:autoCompletesize="40"maxlength="100"id="cityField"completionMethod="#ApplicationBean.completeCity}"value="#{SessionBean.city}"required="true"ondisplay="function(item){returnextractCity(item);}"onchoose="function(item){returnchooseCity(item);}"/>2.GoogleMap代码:4.文档编辑器5.类Yahoo的打分按钮代码:<ui:ratingid="rating"maxGrade="5"includeNotInterested="true"includeClear="true"hoverTexts="#{RatingBean.ratingText}"notInterestedHoverText="NotInterested"clearHoverText="ClearRating"grade="#{RatingBean.grade}"/>6.日历7.表单验证代码:<ui:ajaxValidatormessageId="input1"eventHook="onkeypress"><h:inputText><f:validateLengthminimum="3"/></h:inputText></ui:ajaxValidator>8.上传工具代码:
<ui:mapViewerid="mapViewerx"center="#{MapBean.mapPoint}"info="#MapBean.mapMarker}" markers="#{MapBean.locations}"style="height:500px;width:700px"/>3.选值填入的输入框
<ui:FileUploadTagid="TestFileuploadForm0"enctype="multipart/form-data"retFunction="testRetFunction"retMimeType="text/xml"postProcessingMethod="#{FileUploadProcessing.postProcessingMethod}"progressBarDivId="progress"progressBarSubmitId="submit1x"progressBarSize="40"><inputtype="file"size="40"name="fileToUpload0"id="fileToUpload0Id"/><br><inputtype="file"size="40"name="fileToUpload1"id="fileToUpload1Id"/><br><inputtype="file"size="40"name="fileToUpload2"id="fileToUpload2Id"/><br><inputtype="submit"name="submit1x"value="Submit"/><divid="progress"></div><br/></ui:FileUploadTag>
现在这个AJAX的组件还处在BluePrint中,无法直接下载使用,可以通过Sun的JavaCreator安装试用,本人觉得JSF的思想是从.Net那边抄过来的,所以没有个好使的IDE支持写起程序来是挺费劲的。有兴趣的朋友可以通过这个网址了解更多:http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/ajax_samples.html
相关文章推荐
- Training Courses: JSP, Servlets,Struts, JSF, AJAX, & Java 5 Programming
- jsf的前途:javaee without AJAX
- 简化 Ajax 和 Java 开发,第 4 部分: 使用 JSP 标记文件创建 JSF 样式的组件
- 读《JavaServer Faces 核心编程(第3版)》一书的记录—— 第1章 JSF 简介——案例 login-ajax
- 简化 Ajax 和 Java 开发之第 4 部分:用 JSP 标记文件创建 JSF 样式的组件
- Java已经开始影响这一代程序员
- java.util.zip.ZipException:ZIP file must have at least one entry
- ajax与java的结合-direct web remoting
- AJAX+JAVA用户登陆注册验证的实现代码
- 关于ajax post请求,参数过大产生的问题解决 Java
- 案例4-3 Ajax的响应处理简单实例(征服Ajax——Web 2.0快速入门与项目实践Java)
- Java+ajax+图片上传
- jsf(Java Server Faces)
- Ajax接收Java服务端发送的text数据(用户名检查)
- Java调用基于 R 的 One-Way ANOVA检测
- Java 后能执行JS(JSF)
- java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z错误
- java 获取ajax的xml
- JAVA企业面试题精选 Ajax和jQuery 1-7
- 面向 Java 开发人员的 Ajax: 使用 Google Web Toolkit 开发 Ajax