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 SergeEby: http://wiki.apache.org/tapestry/Tapestry5Layoutcomponent The comment on the change is: Fix inline images ------------------------------------------------------------------------------ In the package components, create a Layout component and template Layout.java : - {{{ + {{{#!java import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.ioc.annotations.Inject; import org.apache.tapestry.services.Request; @@ -126, +126 @@ Let's try it! In the package page, create a page TestLayout.java which does ot do anything as its only purpose is to test the component. - {{{ + {{{#!java public class TestLayout { } @@ -141, +141 @@ You should get this: - http://bp1.blogger.com/_YQ2Klpj9mz8/R5UZNeBpEdI/AAAAAAAAABA/ndHtLqSvYHI/s1600-h/layout_first_step.png + attachment:layout_first_step.png Note that the title of the page is passed as a parameter. @@ -153, +153 @@ Let's change the component using Delegate, Block, Parameter and a component of our own : Left. Left.java (in the components package) - {{{ + {{{#!java /** * @author Michael Courcy @@ -212, +212 @@ of the component leftRegularContent will be a "content fallback". You have to change Layout.java as well - {{{ + {{{#!java package org.apache.tutorial.tapestrySpringHibernate.components; import org.apache.tapestry.Block; @@ -273, +273 @@ }}} Et voila !! Without defining a left parameter : - {{{ + {{{#!java <t:layout title="literal:My first use of layout component" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> My content </t:layout> }}} you get this: + attachment:layout_second_step_nol_overriding_left.png - http://bp0.blogger.com/_YQ2Klpj9mz8/R5UaOOBpEeI/AAAAAAAAABI/Fk13y6kXlY4/s1600-h/layout_second_step_nol_overriding_left.png - With a left parameter defined : {{{ @@ -294, +293 @@ }}} You get this: - http://bp3.blogger.com/_YQ2Klpj9mz8/R5Ua6-BpEfI/AAAAAAAAABQ/xO4ILTm1yrM/s1600-h/layout_second_step_overriding_left.png + attachment:layout_second_step_overriding_left.png + - (originally posted on Michael Courcy's blog - the images only work if you right click and view image, if anyone can fix this or can host the images where they'll work inline - please do so) + (originally posted on Michael Courcy's blog - the images only work if you right click and view image, if anyone can fix this or can host the images where they'll work inline - please do so ) + NOTE: Inline images have now been fixed (11/23/2008) + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
