tags:

views:

307

answers:

1

We want to pre-fill our richfaces suggestion-box with a inplace text.

Are there any recommendations on how to do this? I think, simple replacement of h:inputText to rich:inplaceInput will not work.

<h:inputText id="field" value="#{form.field}" required="true" /><rich:in
  <rich:suggestionbox id="suggestionBoxId" for="field" suggestionAction="#{suggestion.autocomplete}" var="result" fetchValue="#{result.zip} #{result.cityName}" minChars="3">
    <h:column>
      <h:outputText value="#{result.text}" />
    </h:column>
</rich:suggestionbox>
A: 

If I understand the question correctly, you could simply define form.field as whatever you want to pre-fill with in the @PostConstruct method of the form bean. Or even the constructor, really.

Drew