-<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
-<fi:init xmlns:bu="http://apache.org/cocoon/browser-update/1.0">
<script type="text/javascript"> // Uncomment this to see Dojo debug // var djConfig = { isDebug: true }; </script>
</fi:init>
<h4 class="samplesGroup">AJAX sample</h4>
<title>Cocoon suggests</title>
-<content>
<para>This simple example illustrates the <fd:suggestion-list> feature, that allows to provide suggestions on the fly to the user. </para>
-<fi:form-template ajax="true" action="continue" method="POST">
<fi:continuation-id>74324a5a4e162c7c1b218d36126a1926493c7a3f</fi:continuation-id>
Choose a file in Cocoon's samples. The suggestion-list is written in JavaScript (server side) and scans the samples directory with the input given.
<br/>
-<bu:replace id="path">
-<fi:field id="path" state="active" required="false">
<fi:styling type="suggest"/>
<fi:datatype type="string"/>
</fi:field>
</bu:replace>
<small>To view suggestions, you can either start typing, hit the down arrow on your keyboard or click on the down arrow icon. To choose a suggestion, select it with the mouse, or use the up/down arrow and press space. Hitting escape hides the suggestion list.</small>
<br/>
<br/>
-<bu:replace id="ok">
-<fi:action id="ok" state="active">
<fi:label>OK</fi:label>
</fi:action>
</bu:replace>
</fi:form-template>
-<p>
<a href="./">Back to Forms samples</a>
</p>
</content>
</page>