You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/08/01 22:22:50 UTC
svn commit: r226876 -
/myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml
Author: mmarinschek
Date: Mon Aug 1 13:22:38 2005
New Revision: 226876
URL: http://svn.apache.org/viewcvs?rev=226876&view=rev
Log:
documentation patch
Modified:
myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml
Modified: myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml?rev=226876&r1=226875&r2=226876&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/sandbox/inputSuggestAjax.xml Mon Aug 1 13:22:38 2005
@@ -15,17 +15,21 @@
<section>
<title>Description</title>
<p>
- A tag that defines an autosuggest control complete with ajax binding.
+ A tag that defines an autosuggest control complete with Ajax binding.<br/>
This allows you to do real time autocompletion via asynchronous
- server requests. Note, this control is experimental and it is currently
+ server requests - Ajax. <br/><br/>
+ <code>
+ 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.
+ alteration in the immediate future.
+ Therefore use it with care.
+ </code>
</p>
</section>
<!-- screen shot -->
<section>
<title>Screen Shot</title>
- <figure src="images/inputsuggestajax.jpg" alt="InputSuggestAjax"/>
+ <figure src="images/inputsuggestAjax.jpg" alt="InputSuggestAjax"/>
</section>
<!-- API -->
<section>
@@ -41,21 +45,21 @@
</tr>
<tr>
<td>component-class</td>
- <td>org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjax</td>
+ <td>org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjax</td>
</tr>
<tr>
<td>renderer-class</td>
- <td>org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjaxRenderer</td>
+ <td>org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjaxRenderer</td>
</tr>
<tr>
<td>tag-class</td>
- <td>org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjaxTag</td>
+ <td>org.apache.myfaces.custom.inputsuggestAjax.InputSuggestAjaxTag</td>
</tr>
</table>
</section>
<section>
<title>Syntax</title>
- <source><x:ajaxsuggest id="id" binding="control binding"
+ <source><x:Ajaxsuggest id="id" binding="control binding"
auggestedItemsMethod="backend bean callback method" value="Bean"/>
</source>
</section>
@@ -81,16 +85,22 @@
<br />
<code>
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
+ needed data transformation between the Ajax control and the backend/frontend
</code>
</p>
<p>
- Note - This component is different to others, it uses ajax mechanisms
+ 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.
- The call order is like following:
- control->ajax request->suggestionMethod in backend bean -> values pushed into the control binding ->result into the client ->control shows suggestion drop down
- What has to be done on the backend side, is to implement the beanmethod, which is called and
+
+ <br/><br/>
+ Description of the call order:<br/>
+ <code>
+ control -> Ajax request -> suggestionMethod in backend bean -> values pushed into the control binding -> result sent back to the client -> control shows suggestion drop down
+ </code>
+ <br/><br/>
+ 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.