Monday, 15 April 2013

jsf - p:selectOneMenu sends null value to controller -


I am quite new to JSF and am trying to do the following

I have an app : The checkbox menu which is the list of employees and one of them will be made their leader, so I was trying to make a P: selector check menu that will list me. The selected names will be stored in a list and a P: SelectOnmenu will update, which will re-submit those selected names and one of them will be selected (P: SelectionOnmenu) basically p: selectcheckbox Can choose. And P: Select the menu. We will select one of the selected people.

My code:

  & lt; P: outputLabel for = "teamMemb" value = "select team member"; & Lt; / P: outputLabel & gt; & Lt; P: selectCheckboxMenu id = "teamMemb" value = "# {teamMaintainanceController.teamMemb}" & gt; & Lt; P: Ajax update = "Team leader" & gt; & Lt; / P: Ajax & gt; & Lt; F: SelectionEdit Value = "# {Employee Monitoring Controller. PossibleManagerList}" & gt; & Lt; / F: selectItems & gt; & Lt; / P: selectCheckboxMenu & gt; & Lt; P: = "teamLeader" value = "selection team leader"> gt; & Lt; / P: outputLabel & gt; Output label for & lt; P: selectOneMenu id = "teamLeader" value = "# {teamMaintainanceController.teamLeader}" & gt; & Lt; F: select item item label = "select one" itemValue = "" /> & Lt; F: select item item label = "# {teamMaintainanceController.teamMemb}" itemValue = "# {teamMaintainanceController.teamMemb}" value = "# {teamMaintainanceController.teamMemb}" /> & Lt; / P: selectOneMenu & gt; & Lt; P: Command button object = "applicable BTN" value = "add" ajax = "wrong" activist = "# {teammount controller.admin}" />  

Everything is enclosed in one form. The problem now is, when I select values ​​from P: selector checkbox menu: SelectOnmenu updates and displays the list of people who were previously selected, but when I select one of them and the button I click on the verification error and the console shows that the value is essential I checked and it is going to be zero when we click on the button.

Why not really get me please help

PS: I'm using @conversion


No comments:

Post a Comment