Hi,

the component should be sufficient documented here:

(along with the label/value-approach)

http://wiki.apache.org/myfaces/InputSuggestAjax

How would the component make a
difference between a value resulting from a selected entry (label) and a new
value added in purpose (creation of a new label).

You can easily check for the submitted value in the corresponding
converter. See also in the reference above.

cheers,

Gerald

On 3/28/07, Jerome Iffrig (Europe) <[EMAIL PROTECTED]> wrote:




Thanks lots Mike for your answer,

What you are describing is what I am going currently, I was hoping for a
more elegant way ...
How about the value/label aspect? It does not seem to be documented
anywhere.

 ________________________________

De: Mike Kienenberger [mailto:[EMAIL PROTECTED]
Date: mer. 28/03/2007 20:30
À: MyFaces Discussion
Objet : Re: inputSuggestAjax: value vs. label, existing entries vs. new ones




Seems like you'd just check that when the value is submitted.

See if "value" is contained in the list provided by "suggestedItemsMethod".
If true, link.  If false, create.

You could either handle this in the "setValue()" method or in the
action that submitted the page.

On 3/28/07, Jerome Iffrig (Europe) <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Using the inputSuggestAjax, I get autocompletion, brilliant.
>
> Now, is there any way to add in the response whether the sent value is
> effectively one of the auto-suggested values or something else, new (thus
> not yet in the autocomplete list)?
>
> I was imagining maybe an hidden field set to 0 or 1 …
>
>
>
> Furthermore, it seems to me that this component can work with label-value
> lists, if it is the case, what happens when selecting one of the suggested
> entry is clear to me (the value is returned instead of the label), but
what
> once again, if the user enters something new? How would the component make
a
> difference between a value resulting from a selected entry (label) and a
new
> value added in purpose (creation of a new label).
>
>
>
> The bottom line is that it is important in my use case that the user could
> either select something from the suggested list (so that I can link onto
the
> PK in the underlying DBMS) OR enter any value of his choice (so that I can
> create a new entry in the underlying DBMS).
>
>
>
> Thanks for your lights.
>
>
>
>



--
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