Hi,

what is about inputSuggestAjax or inputSuggest from sandbox? Both work
fine to me.

See:

http://example.irian.at/example-sandbox-20061108

cheers,

Gerald

On 11/8/06, Holger Prause <[EMAIL PROTECTED]> wrote:
Stephen Osella schrieb:
> Does anyone know of an input text control with suggestion pull-down
> menu like capability?  ala Google suggest toolbar?

I am using scriptaculous for autocompletetion

Short example how i use it:

<head>
<style type="text/css">
        div.autocomplete {
      position:absolute;
      width:250px;
      background-color:white;
      margin:0px;
      padding:0px;
    }
    div.autocomplete ul {
      list-style-type:none;
      border:1px solid #888;
      margin:0px;
      padding:0px;
    }
    div.autocomplete ul li.selected { background-color: #56DDFA;}
    div.autocomplete ul li {
      list-style-type:none;
      display:block;
      margin:0;
      padding:2px;
      height:20px;
      cursor:pointer;
    }
</head>

<script type="text/javascript" src="../javascripts/scriptaculous.js">
</script>
<script type="text/javascript" src="../javascripts/prototype.js"> </script>

<h:inputText styleClass="member_#{receiver.member_id}"
value="#{receiver.nickName}" />
<div id="autocomplete_#{receiver.member_id}" class="autocomplete"></div>

<script type="text/javascript">
                     //stupid workaround course source h:inputText dont
get its id stable rerendered in a forEach loop
                     inputField =
document.getElementsByClassName("member_#{receiver.member_id}")[0];
                    new Ajax.Autocompleter(inputField,
"autocomplete_#{receiver.member_id}",
"#{application.autoCompleteMemberUrl}", {paramName: "memberName"});
</script>

Works fine for me , maybe it helps,

Bye,

Holger



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to