6 Replies Latest reply on Mar 18, 2008 12:45 PM by tomstrummer.tomstrummer.gmail.com

    Passing properties via components.xml

    tomstrummer.tomstrummer.gmail.com

      Hi -- I have Seam components defined via the @Name annotation, but I want to externalize some configuration and pass in the values via components.xml,


      i.e.


      @Name("weatherBean")
      public class WeatherBean { ...
      
      }
      



      And then in components.xml...


           <component name='weatherBean'>
                <property name="requestURL">@myPT.weather.requestURL@</property>
           </component>
      



      I was hoping Seam would auto-create based on the Name annotation and then merge the configuration from components.xml given the matching name.  However this doesn't seem to work.  Do I have to choose either annotations or XML configuration?


      Thanks.