Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by DanielJue: http://wiki.apache.org/tapestry/Tapestry5HowToCreateATabPanel ------------------------------------------------------------------------------ 1. The page is re-rendered, but since the selectedComponent is 'flashed' to persist, during the next rendering, its value is still 2 1. We now return to the start, but tab2 is returned, and therefore the message will be "tab2". + === Notes === + Remember that the <t:block> code doesn't have to be located where you would have the instance appear. A component from that block will only appear when a delegate calls it. This is the same as in Tapestry 4. + + For example, instead of this: + {{{ + <div id="yui-main"> + <div class="yui-b"> + <div id="mainContent"> + <t:body/> + <t:delegate to="selectedTab"/> + <t:block> + <div t:id="tab1"/> + <div t:id="tab2"/> + <div t:id="tab3"/> + </t:block> + </div> + </div> + </div> + }}} + + You could do this, and it will work the same: + + {{{ + <div id="yui-main"> + <div class="yui-b"> + <div id="mainContent"> + <t:body/> + <t:delegate to="selectedTab"/> + + </div> + </div> + </div> + + <t:block> + <div t:id="tab1"/> + <div t:id="tab2"/> + <div t:id="tab3"/> + </t:block> + }}} + + In fact, you could have all the blocks for your page in the same <t:block> tag, and multiple delegates can pull from this pool of blocks. + + It may also be possible to inject blocks in your page class, or pull blocks from other pages, if you really wanted to. + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
