Pessoal,
Alguém tem idéia doque pode estar acontecendo este erro?javax.faces.FacesException: javax.el.PropertyNotFoundException: /pages/cadastroSprintBacklog.jsp @83,46 value="#{products.nome}": Property 'nome' not found on type java.lang.String
at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
já sobrescrevi equals, hascode e tostring na minha classe de domínio:
public String toString() {
return this.nome;
}
Estou usando o componente rich:listShuttle da seguinte forma:
<rich:listShuttle sourceValue="#{listaSprintBean.productsPBEA}"
targetValue="#{listaSprintBean.productsPBEASelecionados}"
var="products" listsHeight="150" sourceListWidth="130"
targetListWidth="130" sourceCaptionLabel="Estorias Disponiveis"
targetCaptionLabel="Estorias incluidas no Sprint" converter="[b]sprintConverter[/b]">
<rich:column>
<h:outputText value="#{products.nome}"></h:outputText>
</rich:column>
<a4j:support event="onlistchanged" />
<a4j:support event="onorderchanged" />
</rich:listShuttle>
tenho um converter: converter="sprintConverter":
Obs: está configurado no faces-config.xml, pelo debug ele chega lá
public class ListSprintBacklog implements javax.faces.convert.Converter {
private Logger logger;
public ListSprintBacklog() {
logger = Logger.getLogger(ListSprintBacklog.class);
}
public Object getAsObject(FacesContext facesContext, UIComponent component,
String string) {
logger.debug("Convertendo String para Object ProductBacklog");
ProductBacklogTO filtroPBEA = new ProductBacklogTO();
Collection<ProductBacklogTO> convertido = null;
if (string == null) {
return null;
}
filtroPBEA.setNome(string);
logger.debug("String: " + string);
convertido = ServiceFactory.getProductBacklogService().findByFilters(filtroPBEA);
for (ProductBacklogTO product : ServiceFactory.getProductBacklogService().findByFilters(filtroPBEA)) {
convertido.add(product);
}
return convertido;
}
public String getAsString(FacesContext facesContext,
UIComponent uIComponent, Object object) {
logger.debug("Convertendo Object ProductBacklog para String");
if (object == null) {
return null;
}
logger.debug("Object: " + object.toString());
if (object instanceof ProductBacklogTO) {
ProductBacklogTO o = (ProductBacklogTO) object;
return "" + (String) o.getNome().toString();
} else {
throw new IllegalArgumentException("object:" + object + "of type:"
+ object.getClass().getName() + "; expected type:"
+ "br.com.uniube.apm.to.ProductBacklogTO");
}
}
}
alguém conseguiria me ajudar? vlw