}
}
value="#{loanSelectionListDataModelBean.loanName}"
valueChangeListener="#{loanSelectionListDataModelBean.selectedLoanNameList }"
immediate="true">
<f:selectItems
value="#{loanSelectionListDataModelBean.loanNameList}" />
</h:selectOneListbox>
It involves a call to an EJB which returns an ArrayList populated with the data;
// Get Loan Name
String sLoanName = loan.getName();
intCount++;
String sCount = (new Integer(intCount)).toString();
SelectItem selectItem = new SelectItem(sCount, sLoanName, "");
alLoansList.add(selectItem);
alLoansList is returned and used to populate the "selectOneListbox".
There is not a problem with the backing bean. Every is populated correctly. I can get the "sCount" but it is the "sLoanName" I can't get!
From: Bruno Aranda [mailto:[EMAIL PROTECTED]]
Sent: 13 April 2005 08:41
To: MyFaces Development; [EMAIL PROTECTED]
Subject: Re: Getting Values from selectOneListbox
How do you create the list of SelectItems in your backing bean (loanNameList)?
On 4/12/05, Roger Lee < [EMAIL PROTECTED] > wrote:
I populate a selectOneListbox with data from a table from a backing class;
<h:selectOneListbox id="loanSelectionListbox"
value="#{loanSelectionListDataModelBean.loanName}"
valueChangeListener="#{loanSelectionListDataModelBean.selectedLoanNameList}"
immediate="true">
<f:selectItems
value="#{loanSelectionListDataModelBean.loanNameList}" />
</h:selectOneListbox>
value = valueChangeEvent.getNewValue ();
This give the element number select in the list 1-99 etc
How do I get the actual value text (Loan Name)?
Thanks,
Roger Lee
--
-Heath Borders-Wing
[EMAIL PROTECTED]
