Javaone: Evolution of JSF-Ajax has arrived

Source: Internet
Author: User

 

Recently, I have been paying close attention to Java One. The coming of ejb3 is naturally a top priority, but it is not necessary to worry about its applications. Today I saw a report on JSF, which is worth mentioning.
Let's take a look at JSF's latest Ajax-based API, which has simply encapsulated ajax to the end:
1. Automatically fill in the table column

Code:
<UI: AutoComplete size = "40" maxlength = "100" id = "cityfield" completionmethod = "# applicationbean. completecity} "value =" # {sessionbean. city} "required =" true "ondisplay =" function (item) {return extractcity (item);} "onchoose =" function (item) {return choosecity (item );} "/>

2. Google Map


Code:
 <ui:mapViewer id="mapViewerx" center="#{MapBean.mapPoint}" info="#MapBean.mapMarker}"
     markers="#{MapBean.locations}" style="height: 500px; width: 700px"/>

3. input box for selecting values

4. Document Editor

5. Yahoo-like scoring buttons

Code:
<UI: rating id = "rating" maxgrade = "5" comment denotinterested = "true" comment declear = "true"
Hovertexts = "# {ratingbean. ratingtext}" notinterestedhovertext = "not interested"
Clearhovertext = "Clear rating" grade = "# {ratingbean. Grade}"/>

6. Calendar

7. Form Verification

Code:
<UI: ajaxvalidator messageid = "input1" eventhook = "onkeypress">
<H: inputtext>
<F: validatelength minimum = "3"/>
</H: inputtext>
</UI: ajaxvalidator>

8. upload tool

Code:
<ui:FileUploadTag id="TestFileuploadForm0" enctype="multipart/form-data"
      retFunction="testRetFunction" retMimeType="text/xml" postProcessingMethod="#{FileUploadProcessing.postProcessingMethod}"
        progressBarDivId="progress" progressBarSubmitId="submit1x" progressBarSize="40">
            <input type="file" size="40" name="fileToUpload0" id="fileToUpload0Id"/><br>
            <input type="file" size="40" name="fileToUpload1" id="fileToUpload1Id"/><br>
            <input type="file" size="40" name="fileToUpload2" id="fileToUpload2Id"/><br>
            <input type="submit" name="submit1x" value="Submit"/>
      <div id="progress"></div><br/>
</ui:FileUploadTag>

Currently, this Ajax component is still in blueprint and cannot be directly downloaded and used. You can install it for trial using sun's Java creator. I think the idea of JSF is from. net, so there is no good ide support to write the program, it is very difficult.
Interested friends can learn more through this URL: http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/ajax_samples.html


 

 

Sss

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.