Board index JavaServer Faces General Help me please error primefaces 3.1

Help me please error primefaces 3.1

Components, Ajax Framework, Utilities and More.


Posts: 9
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:body>

<h:form prependId="false">

<h:panelGrid id="panelgr" columns="1">
<p:dataTable id="enfTable" var="emfer" value="#{enfermedadesMage.obtenertodos1()}" paginator="true" paginatorPosition="bottom" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" >


<p:column headerText="Codigo">

<h:outputText value="#{emfer.idEnfermedades}"/>

</p:column>
<p:column headerText="Nombre">

<h:outputText value="#{emfer.nombresEnfermedadaes}"/>
</p:column>



</p:dataTable>


</h:panelGrid>
</h:form>
</h:body>
</html>




/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ManageBeans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import domain.Enfermedades;
import java.util.List;
import bean.ServilocarBeanImp;

import java.util.ArrayList;
/**
*
* @author jose
*/
@ManagedBean
@RequestScoped
public class enfermedadesMage {
//declaracion devariables
private ServilocarBeanImp servicios;
private Enfermedades enfermedades=new Enfermedades();
private List<Enfermedades> selectedEnfermedades =new ArrayList<Enfermedades>();
private Enfermedades selectEnfermedades =new Enfermedades();
//constructor
public enfermedadesMage() {
servicios=new ServilocarBeanImp();

}



//Metodos get y set

public Enfermedades getEnfermedades() {
return enfermedades;
}

public void setEnfermedades(Enfermedades enfermedades) {
this.enfermedades = enfermedades;
}

public ServilocarBeanImp getServicios() {
return servicios;
}

public void setServicios(ServilocarBeanImp servicios) {
this.servicios = servicios;
}

public List<Enfermedades> getSelectedEnfermedades() {
return selectedEnfermedades;
}

public void setSelectedEnfermedades(List<Enfermedades> selectedEnfermedades) {
this.selectedEnfermedades = selectedEnfermedades;
}

public Enfermedades getSelectEnfermedades() {
return selectEnfermedades;
}

public void setSelectEnfermedades(Enfermedades selectEnfermedades) {
this.selectEnfermedades = selectEnfermedades;
}



//metodos salvar
public void salvar(){
this.servicios.getInformacion().addObjet(enfermedades);
}
//metodo actualizar
public void actualizar(){
this.servicios.getInformacion().updateObjet(enfermedades);
}
//metodos eliminar
public void eliminar(){
this.servicios.getInformacion().deleteObjet(enfermedades);
}

//metodo cargar todo
public List<Enfermedades> obtenertodos(){
return this.servicios.getInformacion().getAllEnfermedades();
}


public List<Enfermedades> obtenertodos1(){
Enfermedades a= new Enfermedades();
a.setIdEnfermedades(12);
a.setNombresEnfermedadaes("asa");
List<Enfermedades> aa=new ArrayList<Enfermedades>();
aa.add(a);
//System.out.print(a.getNombresEnfermedadaes());
return aa;

}


}

package domain;
// Generated 11-ene-2012 18:01:56 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;

/**
* Enfermedades generated by hbm2java
*/
public class Enfermedades implements java.io.Serializable {


private int idEnfermedades;
private String nombresEnfermedadaes;


public Enfermedades() {
}

public Enfermedades(String nombresEnfermedadaes, Set fuentesCalculoses) {
this.nombresEnfermedadaes = nombresEnfermedadaes;

}

public int getIdEnfermedades() {
return this.idEnfermedades;
}

public void setIdEnfermedades(int idEnfermedades) {
this.idEnfermedades = idEnfermedades;
}
public String getNombresEnfermedadaes() {
return this.nombresEnfermedadaes;
}
public void setNombresEnfermedadaes(String nombresEnfermedadaes) {
this.nombresEnfermedadaes = nombresEnfermedadaes;
}
}

this gives me this error help me please

com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
GRAVE: Error Rendering View[/newxhtml.xhtml]
javax.el.PropertyNotFoundException: /newxhtml.xhtml @12,324 value="#{enfermedadesMage.obtenertodos1()}": Propiedad 'obtenertodos1' no hallada en el tipo ManageBeans.enfermedadesMage
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at org.primefaces.component.datatable.DataTable.isLazy(DataTable.java:922)
at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:177)
at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:103)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

tools
3.1 primefaces
2.1.4 jsf

tandraschko PrimeFaces Core Developer

Posts: 2177
Location: Bavaria, DE

1) use code tags
2) please post exception in english
Always Bet On Prime (+ Extensions)!

PrimeFaces Extensions: https://github.com/primefaces-extensions
OpenWebBeans: http://openwebbeans.apache.org/
DeltaSpike: http://deltaspike.apache.org/
Personal Blog: http://tandraschko.blogspot.de/

T.dot User avatar
Expert Member

Posts: 603
Location: Vienna/Austria
Try to use correct getter naming:

jsf:
<p:datatable value="#{enfermedadesMage.obtenertodos1}" .... >

java:
public List<Enfermedades> getObtenertodos1(){
...
}
Using PF 3.3-3.5, Mojarra 2.1.13-2.1.21, Tomcat 6-7, JBoss 5-7

Some of my issues won't get fixed #3423 #3489 ;)


Posts: 9
Whats, no understands!
Please , i need help!
does not recognize the properties
the beans so the above error....

T.dot User avatar
Expert Member

Posts: 603
Location: Vienna/Austria
Did you try my suggestion?
Using PF 3.3-3.5, Mojarra 2.1.13-2.1.21, Tomcat 6-7, JBoss 5-7

Some of my issues won't get fixed #3423 #3489 ;)


Posts: 9
Thanks you!


Return to General