I got this exception:
javax.faces.FacesException: javax.servlet.ServletException: Value binding
'null'of UISelectItems with component-path {Component-Path : [Class:
org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId:
/JSP/Seguridad/LoginPaso2.jsp][Class: javax.faces.component.html.HtmlForm,Id:
_idJsp1][Class: javax.faces.component.html.HtmlSelectOneMenu,Id:
_idJsp5][Class: javax.faces.component.UISelectItems,Id: _idJsp6]} does not
reference an Object of type SelectItem, SelectItem[], Collection or Map but
of type : *null*
I check my ArrayList in my bean an is not null, what it could be??
On 7/25/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
It would be the same type as what the converter returns from the
selectOneMenu control. In your case, you will need to convert Strings
to Integer so that the submitted value can be converted into the same
type as your bean field.
On 7/25/07, daniel ccss <[EMAIL PROTECTED]> wrote:
> Hi all, I have a Simple question of SelectOneMenu
>
> In my bean I have an ArrayList with Patients, that is fill with an EJB
> method. Patient object have the patientId and the patientName
> Now how I can display it on a SelectOneMenu??
>
> I searched and saw something like the following code, what I didn“t
> understand was: what myBean.selectedItem is, I know that
> myBean.selectedItems is the ArrayList, but what is selectedItem? Can
> someone give a simple example for this simple question, thanks
>
>
> JSF<h:selectOneMenu value="#{myBean.selectedItem}">
> <f:selectItems value=
> "#{myBean.selectItems}" />
> </h:selectOneMenu>
>
>
> MyBeanprivate Integer selectedItem;
> // + getter + setter
>
> public List getSelectItems() {
>
> List selectItems = new ArrayList();
> selectItems.add(new SelectItem(integer1, string1);
>
> selectItems.add(new SelectItem(integer1, string2);
> ...
> return selectItems;
>
> }
>
>
>
>
>
>