Ae pessoal tou fazendo uma aplicação com JSF e ICE Faces, mais toda vez que eu vou carregar um ice:selectOneMenu
<h:outputText value="Nivel Restricao:"/>
<ice:selectOneMenu id="nivelRestricao" value="#{segmentoMercado.nivelRestricaoCollection.nivelRestricao.id}" title="NivelRestricao">
<s:selectItems value="#{segmentoMercadoController.nivelRestricao}"
var="nivel"
label="#{nivel}"
noSelectionLabel="Selecione um nivel de restricao..."/>
<s:convertEntity />
</ice:selectOneMenu><br/>
Dá sempre esse Erro:
sourceId=j_id69:nivelRestricao[severity=(ERROR 2), summary=(/prospeccao/segmentoMercado/edit.xhtml @183,167 value="#{segmentoMercado.nivelRestricaoCollection.nivelRestricao.id}": Target Unreachable, 'nivelRestricaoCollection' returned null on 'br.com.det.facz.entity.SegmentoMercado'), detail=(/prospeccao/segmentoMercado/edit.xhtml @183,167 value="#{segmentoMercado.nivelRestricaoCollection.nivelRestricao.id}": Target Unreachable, 'nivelRestricaoCollection' returned null on 'br.com.det.facz.entity.SegmentoMercado')]
O meu Back-Bean tá assim…
public class SegmentoMercado extends EntityBase implements Serializable {
[code]
@Id
@Column(name = “SGM_ID”, nullable = false)
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer id;
@Column(name = "SGM_Nome", nullable = false)
private String nome;
@Column(name = "SGM_Desc")
private String descricao;
@Column(name = "SGM_Hierarquia", nullable = false)
private String hierarquia;
@OneToMany(mappedBy = "segMercado")
private Collection<Cedente> cedenteCollection;
@OneToMany(mappedBy = "segmentoSegPai")
private Collection<SegmentoMercado> segmentoMercadoCollection;
@JoinColumn(name = "SGM_SGM_SegPai", referencedColumnName = "SGM_ID")
@ManyToOne
private SegmentoMercado segmentoSegPai;
@OneToMany(cascade = {CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE}, mappedBy = "segmentoMercado")
private Collection<SegmentoMercadoCnae> cnaeCollection;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "segmentoMercado", fetch=FetchType.EAGER)
private Collection<SegmentoMercadoNivelRestricao> nivelRestricaoCollection;[/code]
Algéum sabe como resolver o problema? Valeu!