站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Java 专题JavaOne:JSF的进化??AJAX已经来了

JavaOne:JSF的进化??AJAX已经来了

摘要: JavaOne:JSF的进化??AJAX已经来了

</td> </tr> <tr> <td height="35" valign="top" class="ArticleTeitle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="283" height="86" align="center" valign="top"> </td> <td width="401" valign="top">
   最近在密切关注着Java One,EJB3的来临自然是头等大事,但是基于
它的应用还不用着急。今天看到了关于JSF的报道,倒是值得拿来说说。
来看看JSF最新基于AJAX的API,已经把AJAX简单地封装到底了:
1.自动填表栏
</td> </tr> </table>

代码:
onchoose="function(item) { return chooseCity(item); }"/>

2. Google Map




代码:
markers="#{MapBean.locations}" style="height: 500px; width: 700px"/>


3. 选值填入的输入框

4. 文档编辑器

5. 类Yahoo的打分按钮



代码:
hoverTexts="#{RatingBean.ratingText}" notInterestedHoverText="Not Interested"
clearHoverText="Clear Rating" grade="#{RatingBean.grade}"/>

6. 日历




7. 表单验证



代码:




8. 上传工具


代码:
retFunction="testRetFunction" retMimeType="text/xml" postProcessingMethod="#{FileUploadProcessing.postProcessingMethod}"
progressBarDivId="progress" progressBarSubmitId="submit1x" progressBarSize="40">
<input type="file" size="40" name="fileToUpload0" id="fileToUpload0Id"/>

<input type="file" size="40" name="fileToUpload1" id="fileToUpload1Id"/>

<input type="file" size="40" name="fileToUpload2" id="fileToUpload2Id"/>

<input type="submit" name="submit1x" value="Submit"/>



现在这个AJAX的组件还处在BluePrint中,无法直接下载使用,可以通过Sun的Java Creator安装试用,本人觉得JSF的思想是从.Net那边抄过来的,所以没有个好使的IDE支持写起程序来是挺费劲的。

有兴趣的朋友可以通过这个网址了解更多:
http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/ajax_samples.html

</td> </tr> <tr>


↑返回目录
前一篇: Ajax优于JSF的原因
后一篇: JSF的中文化与国际化的简便方法