[jboss-user] [JBoss Seam] - [1.3.0 Alpha]property 'aString' not found on type java.lang
enzhao
do-not-reply at jboss.com
Thu Jun 21 14:15:34 EDT 2007
This exception:
javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
Here is the relevant code in the new-recipe.xhtml:
| <rich:panel id="storedIngredients"
| rendered="#{createRecipe.ingredients.size > 0}">
| <h:dataTable value="createRecipe.ingredients" var="ingre">
| <h:column>
| <f:facet name="header">
| <h:outputText value="Measurement" />
| </f:facet>
| <h:outputText value="#{ingre.unitSeq}" />
| </h:column>
| </h:dataTable>
| </rich:panel>
|
Here is the relevant code in the backing bean:
| @Stateful
| @Name("createRecipe")
| @Scope(CONVERSATION)
| public class CreateRecipeUseCase implements Serializable, CreateRecipe {
|
| @In private EntityManager entityManager;
|
| @In(required = false)
| @Out(required = false)
| private Recipe recipe;
|
| private Integer recipeId;
|
| private List<Ingredient> ingredients;
|
|
| @Begin
| public void stageOne() {
| entityManager.persist(recipe);
| recipeId = recipe.getId();
| ingredients = new ArrayList<Ingredient>();
| }
|
| ...
|
| public void addAnIngredient(BigDecimal amount) {
| Food tmp = entityManager.find(Food.class, "01001"); //for testing purpose
| try {
| Ingredient ingre = new Ingredient(recipe, tmp,
| ingredient.getAmount(), this.ingreWeight.getSeq());
| entityManager.persist(ingre);
| this.ingredients.add(ingre);
| } catch (EatSmartPersistenceException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
|
|
| @End
| public void cancel() {}
|
| @Remove
| @Destroy
| public void destroy() {}
|
| /**
| * @return the ingredients
| */
| public List<Ingredient> getIngredients() {
| return ingredients;
| }
|
| /**
| * @param ingredients
| * the ingredients to set
| */
| public void setIngredients(List<Ingredient> ingredients) {
| this.ingredients = ingredients;
| }
|
| /**
| * @return the recipeId
| */
| public Integer getRecipeId() {
| return recipeId;
| }
|
| /**
| * @param recipeId
| * the recipeId to set
| */
| public void setRecipeId(Integer recipeId) {
| this.recipeId = recipeId;
| }
|
| // other methods ...
|
It's very strange since the new ingredient instance was always successfully created and in the database the persisted evidence can also be found. Why the attributes of a persisted new ingredient cannot be displayed on the page? I'm using Seam 1.3.0 Alpha on JBoss AS 4.2.0. Here is the full error stack:
2007-06-21 19:50:17,218 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.persistence.persistenceProvider
2007-06-21 19:50:17,234 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: ingre
2007-06-21 19:50:17,234 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: ajaxContext
2007-06-21 19:50:17,234 ERROR [STDERR] Jun 21, 2007 7:50:17 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/new-recipe.xhtml]
javax.faces.FacesException: javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:279)
at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:307)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:62)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
... 66 more
Any enlightenment would be highly appreciated! Thanks in advance!!!
Regards,
Ellen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056625#4056625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056625
More information about the jboss-user
mailing list