Olá pessoa, alguem já passou por esta situação, tenho alguns h:selectOneMenu dentro de um modal do prime, e quase todos vem nulos…
alguém sabe dizer se é bug?
ele nem entra dentro do converter…
codigo do meu combo:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<composite:interface>
<!-- PROMPTS -->
<composite:attribute name="clientId" />
<composite:attribute name="label" />
<composite:attribute name="id" />
<composite:attribute name="value" />
<composite:attribute name="itemLabel" />
<composite:attribute name="itemValue" />
<composite:attribute name="changeListener" />
<composite:attribute name="valueChangeListener"
method-signature="void action()"></composite:attribute>
<composite:attribute name="selectItens"></composite:attribute>
<composite:attribute name="update" />
<composite:attribute name="right" />
<composite:attribute name="align" default="left" />
<composite:attribute name="size" default="198px" />
<composite:attribute name="entity" default="false" />
<composite:attribute name="converter" default="selectOneUsingObjectConverter" />
<composite:attribute name="noSelectLabel" default="false" />
<composite:attribute name="process" default="@this"/>
</composite:interface>
<composite:implementation>
<h:outputStylesheet name="style_componentes.css" library="css"
rendered="true"></h:outputStylesheet>
<link href="#{application.contextPath}/pub/css/style_login.css"
rel="stylesheet" type="text/css" />
<div id="#{cc.clientId}"
style=" position: relative; padding-left: 3px; text-align: #{cc.attrs.align}; ">
<h:outputLabel id="#{cc.attrs.id}_output" styleClass="outPut"
value="#{cc.attrs.label}" />
<br />
<c:choose>
<c:when test="#{!cc.attrs.changeListener and cc.attrs.entity}">
<h:selectOneMenu id="#{cc.attrs.id}" value="#{cc.attrs.value}"
items="#{cc.attrs.selectItens}" style="width:#{cc.attrs.size};"
styleClass="selectItem" >
<c:if test="#{!cc.attrs.noSelectLabel}">
<f:selectItem itemLabel="#{msgSistema.lblSelecione}" itemValue="" />
</c:if>
<f:selectItems value="#{cc.attrs.selectItens}"
itemLabel="#{cc.attrs.itemLabel}" var="item"
itemValue="#{cc.attrs.itemValue}">
</f:selectItems>
<f:converter converterId="selectOneUsingObjectConverter"/>
</h:selectOneMenu>
</c:when>
<c:when test="#{!cc.attrs.changeListener and !cc.attrs.entity}">
<h:selectOneMenu id="#{cc.attrs.id}" value="#{cc.attrs.value}"
style="width:#{cc.attrs.size};" styleClass="selectItem">
<c:if test="#{!cc.attrs.noSelectLabel}">
<f:selectItem itemLabel="#{msgSistema.lblSelecione}" itemValue="" />
</c:if>
<f:selectItems value="#{cc.attrs.selectItens}">
</f:selectItems>
</h:selectOneMenu>
</c:when>
<c:when test="#{cc.attrs.changeListener and cc.attrs.entity}">
<h:selectOneMenu id="#{cc.attrs.id}" value="#{cc.attrs.value}"
items="#{cc.attrs.selectItens}" style="width:#{cc.attrs.size};"
styleClass="selectItem" converter="selectOneUsingObjectConverter">
<c:if test="#{!cc.attrs.noSelectLabel}">
<f:selectItem itemLabel="#{msgSistema.lblSelecione}" itemValue="" />
</c:if>
<f:selectItems value="#{cc.attrs.selectItens}"
itemLabel="#{cc.attrs.itemLabel}" var="item"
itemValue="#{cc.attrs.itemValue}" />
<p:ajax id="teste" global="true" process="#{cc.attrs.process}"
listener="#{cc.attrs.valueChangeListener}" event="change"
update="#{cc.attrs.update}" />
</h:selectOneMenu>
</c:when>
<c:otherwise>
<h:selectOneMenu id="#{cc.attrs.id}" value="#{cc.attrs.value}"
style="width:#{cc.attrs.size};" styleClass="selectItem">
<c:if test="#{!cc.attrs.noSelectLabel}">
<f:selectItem itemLabel="#{msgSistema.lblSelecione}" itemValue="" />
</c:if>
<f:selectItems value="#{cc.attrs.selectItens}"
itemLabel="#{cc.attrs.itemLabel}" var="item">
</f:selectItems>
<p:ajax id="teste" global="true" process="#{cc.attrs.process}"
listener="#{cc.attrs.valueChangeListener}" event="change"
update="#{cc.attrs.update}" />
</h:selectOneMenu>
</c:otherwise>
</c:choose>
<br />
</div>
</composite:implementation>
</html>
Minha pagina:
<comp:comboBox id="cidadeDestino"
value="#{mBean.filtroRota.cidadeOrigem}"
changeListener="false"selectItens="#{mBean.comboCidadesDestino}"
label="#{msg.lblCidade}:" itemLabel="#{item.nome}"
itemValue="#{item}" entity="true">
</comp:comboBox>
lembrando que o combo está dentro de um modal do prime…