1 Reply Latest reply on May 28, 2008 8:31 AM by Stephen Friedrich

    Factory issue

    Mark Nijssen Newbie

      When I try to create an object Material with a OneToMany link to an object B, this link is created through a factory function:
             


             @In(create=true)
              @Out(required=true)
              private Material material;
      
              @Factory("material")
              @SuppressWarnings("unchecked")
              public void createMaterial()
      



      This function works fine, according to the log information I receive. However, the browser does not show the information of the link.
      It seems that OneToMany relationships are not displayed, unless I add the following line to the top of my xhtml code:



             <c:if test="${!empty material}" />




      Does anybody now why this is?

        • 1. Re: Factory issue
          Stephen Friedrich Novice

          Take a step back, rtm and have a look at the examples.
          Describe what you want to do. Do not describe the particular problem you have with an ill-conceived solution.


          Give more context, e.g. browser does not show the information of the link - where is the xhtml (jsp?) that should make the browser show something?


          @Factory is not intended to be used together with @Out.


          Why don't you just create B in the Material constructor?


          How To Ask Questions The Smart Way