Bonjour, désolant d'en arriver à poster ça mais j'ai un problème qui me semble particulier
j'ai cette erreur:
Pour ce code çi:An Error Occurred:
/views/movie/MovieAdd.xhtml @25,51 value="#{movieAddBean.title}": Property [title] not found on type [com.og.managedbean.MovieAddBean]
MovieAdd.xhtml
MovieAddBean.java
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <h:form> <h:outputText value="Titre: " /> <h:inputText value="#{movieAddBean.title}"> <f:validateLength maximum="20" /> </h:inputText> <h:commandButton value="Submit" action="MovieAddValidation" /> </h:form>
et voiçi la pile d'erreurs
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package com.og.managedbean; import java.io.Serializable; import javax.enterprise.context.SessionScoped; import javax.inject.Named; @Named @SessionScoped public class MovieAddBean implements Serializable { private static final long serialVersionUID = 1L; private String title; public void setTitle(String title) { this.title = title; } public String getTitle() { return this.title; } }
Je ne comprend pas... Tous me semble parfaitement correct, y aurait-il une autre piste que vous pourriez me suggérer pour régler ce problème ? Je n'ai ce problème que lorsque j'accède à la propriété de cette classe, donc ce n'est pas un problème venant de ma vue mais clairement bien de cette classe.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 javax.el.PropertyNotFoundException: /views/movie/MovieAdd.xhtml @25,51 value="#{movieAddBean.title}": Property [title] not found on type [com.og.managedbean.MovieAddBean] at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:117) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:200) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:187) at javax.faces.component.UIOutput.getValue(UIOutput.java:179) at javax.faces.component.UIInput.getValue(UIInput.java:311) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:360) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:171) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:151) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: javax.el.PropertyNotFoundException: Property [title] not found on type [com.og.managedbean.MovieAddBean] at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:260) at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:212) at javax.el.BeanELResolver.property(BeanELResolver.java:347) at javax.el.BeanELResolver.getValue(BeanELResolver.java:92) at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) at org.apache.el.parser.AstValue.getValue(AstValue.java:169) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:115) ... 42 more
Je vous remercie d'avance car je respecte toutes les solutions proposées et malgré tout...
Après divers tentatives, je me demande si je n'ai pas un problème de build path, genre ma class ne se mettrait pas à jour dans le build, comment le savoir... ?
Partager