In the first code snippet please ignore the annotation @Stateful. It is just a 
typo (it s not in my code). My code is just:


  | @Entity
  | @Name("mother")
  | public class Mother {
  | 
  |    private Daughter daughter;
  | 
  |    ... setters and getters
  | }
  | 

I found a workaround defining Daughter as a Seam component:


  | @Name("daughter")
  | public class Daughter {
  | 
  |      private String someprop;
  | 
  |     ... setters and getters
  | 
  | }
  | 


and then using it as a separate component and asociating it with mother in Java:

I mean instad of using:


  |  <h:inputText value="#{mother.daughter.someprop}"/>
  | 

I use:


  |  <h:inputText value="#{daughter.someprop}"/>
  | 

and then in the action bean:


  | 
  | @Stateful
  | public class ActionBean {
  |    ....
  | 
  |    @In 
  |    private Mother mother;
  | 
  |    @In
  |    private Daughter daughter;
  | 
  |    public void persistMother () {
  | 
  |       mother.setDaughter(daughter);
  | 
  |       em.persist (daughter);
  | 
  |    }
  | 
  |    ....
  | }
  | 

It is not elegant but at least it works. 

Nevertheless I would like to know if there is any bug in the Expression 
Language interpreter or if I am doing something wrong. Accortding to JSF 
specification the first sintax I mention should work.

any comments?

Thanks in advnace.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121528
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to