2 Replies Latest reply on Jan 18, 2008 11:10 AM by John Peter Bievenour

    [Newbie] Understanding Bijection

    John Peter Bievenour Newbie

      I've been reading through the Seam docs and the concept of Bijection is still a little hazy for me.

      How I understand it so far:
      Injection is used on the session bean to make the entity available without having to "manually" construct it.

      Foo foo;

      Foo foo = new Foo();

      When using injection, Seam searches its context for a component named "foo" and injects it into the session bean. If it is in a stateful context (such as SESSION), this injection may already have data, which otherwise would not be available using the simple constructor. If it doesn't have data, a factory can be called to instantiate the injection.

      To make a component available to the presentation tier, you must outject it so it can be referenced in JSF.
      Bar bar;

      <h:outputText value="#{bar.value}"/>

      Is my understanding correct so far?