I made some more debugging.. The <t:body /> element is added to the end of
the template instead, using addToBody:


Dennis Kempin wrote:
> Hi,
> 
> I want to create a component that wraps all page common html layout into
> one template. Just like this:
> 
> RootComponent:
>         ...
>         <div>
>                 <t:body />
>         </div>
>         ...
> 
> TestPage:
> <t:comp type="RootComponent">
>         This is the content
> </t:comp>
> 
> Works great as long as i dont have two Wrap-around components like this:
> RootComponent:
>         ...
>         <div>
>                 <t:body />
>         </div>
>         ...
> 
> MiddleComponent:
> <t:comp type="RootComponent">
>         ...
>         <t:body />
>         ...
> </t:comp>
> 
> TestPage:
> <t:comp type="MiddleComponent">
>         This is the content
> </t:comp>
> 
> The TestPage wraps the MiddleComponent around itself and the
> MiddleComponent wraps the RootComponent around itself.
> Well, this is what happens:
> 
> java.lang.IllegalStateException: This markup writer does not have a
> current element. The current element is established with the first call to
> element() and is maintained across subsequent calls.
>  at ...MarkupWriterImpl.ensureCurrentElement(MarkupWriterImpl.java:125)
> 
> I tried some debugging and saw that the page content rendercommand is
> pushed to the very end of the queue, when all all sourrounding tags
> already have been closed, not at the place of <t:body /> where it should
> be rendered.
> 
> Any ideas what the problem may be?
> reagards
> Dennis Kempin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to