Hi,

@InjectComponent injects the component defined in tml, @Component injects
instance that is configured by the annotation itself (and the associated tml
if it is defined there also).

http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/Component.html

 - Ville


Oliver Bauer wrote:
> 
> Hi,
> 
> we have noted that T5 doesn't allow recursive components[1],
> so we are currently doing something like this:
> We reference our component in an arbritrary tml like this:
> 
> <t:MyComponent
>   source="root"
>   currentNode="currentNode">
> </t:MyComponent>
> 
> The code stub of the component:
> 
> boolean setupRender(MarkupWriter writer) {
>   // write some opening div
> }
> 
> void beforeRenderBody(MarkupWriter writer) {
>   processRoot(source, writer);
> }
> 
> void cleanupRender(MarkupWriter writer) {
>   // close some opened div's
> }
> 
> This works fine (#processRoot calls itself recursively for its children),
> but now we
> want to display a bean editor in a Node (in processRoot()). Is it possible
> to reference
> a component (like a bean editor) in a component being written in Java? Are
> there any
> examples how to achieve this?
> 
> TIA, Oliver
> 
> [1] [https://issues.apache.org/jira/browse/TAP5-739]
> ___________________________________________________________
> Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
> Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-T5.1--No-recursive-component--%3E-Howto-render-Beaneditor-in-code--tp29273576p29273645.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to