Em Thu, 17 Dec 2009 17:13:15 -0200, Ilya Obshadko <ilya.obsha...@gmail.com> escreveu:

In case I need to switch layouts dynamically (for example to create
"printable version" of the same page) - is that possible to accomplish the task without creating a 'switch' construct between different blocks in the original layout component?

Just use CSS media queries. you can provide one or more CSS files that will be only for printing or for normal viewing or for presentations.

Exemples (notice the media attribute):

<link rel="stylesheet" type="text/css" media="screen" href="sans-serif.css">
<link rel="stylesheet" type="text/css" media="print" href="serif.css">

Inside a CSS file:

@media print {
        .menu: { display: none; }
}

More information at http://www.w3.org/TR/css3-mediaqueries/.

If the above solution isn't enough, take a look at the Delegate component or how BeanEditor works.

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

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

Reply via email to