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