This content has been marked as final.
Show 3 replies
-
1. Re: Component access another component
norman.richards Jan 24, 2008 10:13 PM (in response to gersonk)No. You'd need to declare a getter.
-
2. Re: Component access another component
gersonk Jan 27, 2008 8:25 PM (in response to gersonk)"norman.richards@jboss.com" wrote:
No. You'd need to declare a getter.
Even the componentA declares a getter for its field, how can I access it from componentB's method? -
3. Re: Component access another component
dhinojosa Jan 27, 2008 9:48 PM (in response to gersonk)@Name("componentA") public class ComponentA{ private String fieldX; public void setFieldX(String x) { this.fieldX = x; } } @Name("ComponentB") public class ComponentB{ private ComponentA a; @In public void setComponentA(ComponentA a) { this.a = a; } public void method(){ a.setFieldX(12); } }