How to set select(not only label) value from p:autoComplete

UI Components for JSF
Post Reply
v_panasyuk
Posts: 2
Joined: 03 Mar 2011, 12:37

03 Mar 2011, 15:39

Using

Code: Select all

p:autoComplete id="acSimple" value="#{newAccessionManagedBean.selectedPatient}"
                                completeMethod="#{selectPatientManagedBean.searchByText}"
                                var="patient" itemLabel="#{patient.name}" itemValue="#{patient}" converter="#{patientConverter}"/>
I can select patient, and get only its name.

becouse converter have

Code: Select all

 @Override
    public Object getAsObject(FacesContext fc, UIComponent uic, String string) {
        Patient patient = new Patient();
        patient.setName(string);
        return patient;
    }
but I want set ID,AGE and other options without show this information in label(This information is hidden)
Last edited by v_panasyuk on 04 Mar 2011, 00:12, edited 1 time in total.

v_panasyuk
Posts: 2
Joined: 03 Mar 2011, 12:37

03 Mar 2011, 15:45

Its critical for me. If your framework allow this capability, in future I could be payment user :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests