Hy What i am trying to do si to create an autocomplete input text ,but when the form is submited i want to set an id or an employee Object, not to obtain the string from the input field.can someone help ..how can i use a hiddeninput field or an javascript / ajax function to do that.THX .. 

```
<rich:autocomplete  mode="cachedAjax" tokens="," minChars="0"
            autoFill="true" selectFirst="true"
            autocompleteMethod="#{employeeBean.employeeSuggestions}" var="employee"
            fetchValue="#{employee.firstName} #{employee.lastName}">
             <h:inputHidden id="employeeId" value="#{employee.id}"/>
            <h:column >
                <h:outputText value="#{employee.firstName}" />
                <h:outputText value="&#160;" />
            </h:column>
            <h:column>
                <h:outputText value="#{employee.lastName}" />
            </h:column>
        </rich:autocomplete>
    </h:panelGrid>

    <h:panelGrid columns="3" cellspacing="5">
        <h:commandButton value="#{messages.ok}"
            action="#{departmentBean.addOrUpdateDepartment}">
        </h:commandButton>
        <h:commandButton action="department" value="#{messages.close}"
            immediate="true" />
    </h:panelGrid>

```

i`m open to any suggestions.