-
1. Re: Dynamically updating seam context
cpopetz Mar 27, 2008 5:03 PM (in response to teknokrat)Check out the docs for hot deployment without redeploying.
You can construct Components by instantiating them...there are several constructors that are public, for example:
Component newComponent = new Component(SomeClass.class,"myComponentName");
Note that this isn't a documented API, is probably discouraged, and is in general subject to change. That having been said, it's a lot of fun, will teach you a lot about how Seam works, and can be used for cool tricks (for example, we use it to allow our test cases to use @In to grab DAOs to aid in setting up test scenarios.) You should take a look at how Init.installComponents, because some component functionality like @Filter and @Autocreate won't work if you don't call some methods in Init.
-
2. Re: Dynamically updating seam context
tomstrummer.tomstrummer.gmail.com May 6, 2008 5:32 PM (in response to teknokrat)Actually Component is a documented class in the Seam API, so it is part of the public interface I believe...
http://docs.jboss.com/seam/latest/api/org/jboss/seam/Component.html
Although those JavaDocs could be better documented. How does creating a new Component compare to simply creating an object and adding it to a context instance like
myContext.set( 'bob', myObj );
When a new instance is added to the context, do @In annotations get processed?