2006년 1월 2일 월요일

Apache MyFaces

참고: http://myfaces.apache.org/index.html

 

Apache MyFaces

Welcome to The MyFaces Project

This is the official homepage of the first free open source JavaServer(tm) Faces implementation called "Apache MyFaces".

What is JavaServer(tm) Faces?

JavaServer(tm) Faces is a new and upcoming web application framework that accomplishes the MVC paradigm. It is comparable to the well-known Struts Framework but has features and concepts that are beyond those of Struts; especially the component orientation. Look at Sun's JavaServer(tm) Page to learn more about the Java Specification Request 127 and to download the specification. You can also find a useful Tutorial there!

Jumpstart into Apache MyFaces

Make sure to have a look at our examples - you can find a working distribution at http://www.irian.at/open_source.jsf. Find instructions on installing them yourselves in our 'Getting Started' section. If you can't find information you need on these pages, make sure you also go to our WIKI at http://wiki.apache.org/myfaces

October 27, 2005 - MyFaces 1.1.1 has been released.

MyFaces 1.1.1 has been officially released. This is a minor patch release that fixes a few of the major problems with the previous release.

October 18, 2005 - MyFaces 1.1.1 RC3 is now available.

Please help us test the release candidate before the upcoming official release. You can download the RC here. Please file any isssues you find in JIRA and be sure to report them against version 1.1.1.

Resources

If you are new to JavaServer Faces Technology look at the following resources to become familar with JSF:

 

 

[참고]http://myfaces.apache.org/sandbox/inputSuggestAjax.html

 

 

Ajax Suggest

<s:inputSuggestAjax>

Description

A tag that defines an autosuggest control complete with Ajax binding.
This allows you to do real time autocompletion via asynchronous server requests. Note, this control is experimental and it is currently located in the MyFaces sandbox and can be subject to alteration in the immediate future. So use it with care.

Screen Shot

InputSuggestAjax

API

component-family javax.faces.Input
renderer-type org.apache.myfaces.InputSuggestAjax
component-class org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjax
renderer-class org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjaxRenderer
tag-class org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjaxTag

Syntax

<s:Ajaxsuggest id="id" binding="control binding"
                            suggestedItemsMethod="backend bean callback method" value="Bean"/>
            

Instructions

id - defines the id of the control
suggestedItemsMethod - defines the method call for the backend bean which delivers the preview data
maxSuggestedItems - defines the number of maximal suggested entries (optional)
value - standard bean value for the result
binding - the binding into a control object, this binding is needed because the control object does all the needed data transformation between the Ajax control and the backend/frontend

Note - This component is different to others, it uses Ajax mechanisms to fetch preview data from the server, thus the backend binding can and will be used outside of the standard JSF lifecycle to deliver the data.

Description of the call order:
control -> Ajax request -> suggestionMethod in backend bean -> values pushed into the control binding -> result sent back to the client -> control shows suggestion drop down

On the backend side, a callback method - the suggestion method, has to be implemented, which is called by the Ajax request and fetches the data from a data source. The data then is pushed into the control binding similarly to drop down menus and other controls which use the SelectItem object as data holder. The rest is done automatically.

댓글 없음:

댓글 쓰기