[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

niesar do-not-reply at jboss.com
Tue Jul 18 09:37:50 EDT 2006

Thanks for your answers, guys. I appreciate that!

Maybe I have to make the following point much more clear:

I can't access instance variables from my (embedded) ClassE instance like 
<h:inputText id="classEInst" value="#{classAInst.classEInst.classEVar}" >
When I try to populate the input fields with a construction like that, I immediately get an error message.
javax.faces.el.PropertyNotFoundException: /WEB-INF/facelets/tags/classA-input.xhtml @20,79 value="#{classAInst.classEInst.classEVar}": Bean: test.ClassE, property: classEVar
  | 	at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
  | 	at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
  | 	at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
  | 	at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
  | 	at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
  | ...
Please note, that this error occurrs much earlier than everything we were talking about before. With this approach I'm not even able to display the data and I don't even get to the point to input anything.

In fact, that is what I considered a bug or an incompatibility in my first post. In my understanding #{classAInst.classEInst.classEVar} should also work if ClassE is embedded in ClassA using the EJB3 @Embeddable/@Embedded annotation. However, this doesn't work! 

It looks like I can't access any instance variable from my embedded ClassE object. The only workaround I could find is to pass the complete ClassE object like
<h:inputText id="classEInst" value="#{classAInst.classEInst}" >
But that causes the problem that I have the restriction 1object  <---> 1String for the JSF converter. This way it's also no option.

So right now I have no clue how to solve this problem. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958794#3958794

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958794

More information about the jboss-user mailing list