0
votes

This is my simple PrimeFaces selectOneMenu:

<p:selectOneMenu filter="true" filterMatchMode="contains" value="#{addRequestBean.manager}" converter="omnifaces.SelectItemsConverter" >          
     <f:selectItems value="#{userBean.userList}" var="var" itemLabel="#{var.surname} #{var.name}"  itemValue="#{var}"   />
</p:selectOneMenu> 

The issue is that I cannot choose the same item twice. When I click first time on item everything is ok. The value in ManageBean is correct. But when a choose again the same item in manageBean get null value.

This is Bean, it is veri simple:

@ManagedBean
@ViewScoped
public class AddRequestBean{

User manager = new User();

public void oknoPotwierdzenia() throws NamingException{  
        System.out.println(manager);
    }      

 public User getManager() {
        return manager;
    }

    public void setManager(User manager) {
        this.manager = manager;
    }
}

I do not know what is the reason.

1
minimal reproducible example please and version info.Kukeltje

1 Answers

0
votes

I found the solution. I tested app with omnifaces-2.0 after some time found inforation that ther is a error in this version. Change to omnifaces-2.6.8 solve the issue.