Details
-
Type:
Feature Request
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 4.1.0.Milestone1
-
Fix Version/s: None
-
Component/s: component-input
-
Labels:None
-
Sprint:4.5.0.Beta1 - Upgrade Sprint
-
Forum Reference:
Description
<rich:autocomplete id="client" value="#{newService.client}" autocompleteMethod="#{entitySearch.appEntityClients}" var="_a" fetchValue="#{_a}">
|
<h:outputText value="#{_a.name}" />
|
</rich:autocomplete>
|
Given the above code the fetchValue which is placed in the generated inputText box is what is actually submitted with the form.
To support POJO selects what is needed is to have a value and a valueLabel so that the fetchValue can be displayed to the user but the acutal converted object value is submitted to the form.
I haven't yet looked at the implementation, but it seems to me that what is required is to have another "hidden" input that holds the submitted value. The visible inputText would hold a label for the value. We would then need a new attribute valueLabel, that would be of the form #
{var.myLabel}.
The value that goes into the hidden input should be the string returned from the converter, so it can be converted back to an object on form submission.