Hi

I'm getting the following exception:

Component TestPage:innerlayout is not assignable to field
test.components.Layout.page (of type test.BasePage).

The skeletons for my components are below.  Essentially, my page has an
(inner) layout, which in turn has an (outer) layout.  I try to inject the
page into both (inner and outer) layouts.

The page is successfully injected into the inner layout, but the outer
fails.  @InjectContainer seems to be selecting the wrong component in this
case.  It makes no difference if I remove the injection for the inner layout
(so it doesn't seem to be a conflict).

Should this work?

Richard Hoberman

Page template:
-----------------
<html t:type="InnerLayout" ...>

   //page contents
   
</html>

Inner layout template:
--------------------------

<html t:type="Layout" ...>

   //inner layout markup including <t:body />

</html>

Layout template:
--------------------

<html  ...>

   //layout markup including <t:body />

</html>

Inner Layout class:
----------------------
public class InnerLayout extends BaseComponent {
        
        @InjectContainer
        @Property
        private BasePage page; 

       //etc    
}

Layout class:
---------------
public class InnerLayout extends BaseComponent {
        
        @InjectContainer
        @Property
        private BasePage page; 

       //etc    
}
-- 
View this message in context: 
http://www.nabble.com/-T5--Injecting-page-into-nested-layouts-tp19028771p19028771.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to