Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

Re: Still struggling with templates...

Thiago H de Paula Figueiredo

2012-01-27

Replies: Find Java Web Hosting

Author LoginPost Reply
On Fri, 27 Jan 2012 16:48:20 -0200, Josh Canfield <joshcanfield@(protected)>
wrote:

> Take a look here:
> http://jumpstart.doublenegative.com.au/jumpstart/previews/withlayout/helloworld
> It has an example of passing text to the layout as a parameter.

In addition, JumpStart also has a nice example of blocks and Delegate:
http://jumpstart.doublenegative.com.au/jumpstart/examples/lang/delegateandblocks.
The other thing you'll use is the getBlockParameter(String name) method of
ComponentResources (which you get by @Inject'ion) or just declare it as a
parameter of type Block. Here's the "else" parameter declaration in the If
component, for example:

@Parameter(name = "else", defaultPrefix = BindingConstants.LITERAL)
private Block elseBlock;

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.