Я пытаюсь заполнить SelectOneMenu простых лиц, но приложение вызывает NullPointerException, я не знаю, в чем проблема.вот мой код SelectOneMenu:
<h:outputText value="Domaine : " styleClass="champ"/>
<p:selectOneMenu value="#{projet.currentProjet.typeProjets}" >
<f:selectItem itemLabel="Domaine" itemValue="" />
<f:selectItems value="#{projet.inittprojet()}" var="typeprojet" itemValue="#{typeprojet}" itemLabel="#{typeprojet.designation}" />
</p:selectOneMenu>
вот мой компонент поддержки:
@Component("projetsBean")
@Scope("session") <br>
public class ProjetsBean implements Serializable{ <br>
private transient ProjetsService projetsService;
////////////////////////////////////////////////////////// setters & getters \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
public void setProjetsService(ProjetsService projetsService)
{
this.projetsService=projetsService;
}
public ProjetsService getProjetsService()
{
return projetsService;
}
////////////////////////////////////////////////////////// Méthodes \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
@PostConstruct
открытый список inittprojet () {
return projetsService.getAllProjets();
}
}
1012 * привет *