On Tue, 06 Jul 2010 06:27:41 -0300, t5_lothar <lothar_n...@gmx.de> wrote:
Hi all,
Hi!
(1) If/Else approch: <t:if test=${customerA}> ... display some fields ...
<p:else> ... display other fields ... </p:else> </t:if>
1) Never use expansions in parameters. It coerces the value to a String.
2) This approach tends to get unmaintainable in the long run.
(2) CSS Approch: <div class="customerA"> ... some fields ...</div>
<div class="customerB"> ... other fields ...</div> and set one of the
styles as 'display:none'.
This has the potential of opening security holes.
(3) Page inheritance approch: Put the common stuff in a BasePage and
build two customer dependent variants inheriting from it. Don't know
exactly if
this supported by Tapestry.
It is. You'll need URL rewriting or advising some ComponentClassResolver
methods to do that. Template-wise, the documentation is here:
http://tapestry.apache.org/tapestry5.1/guide/templates.html, section
Template Inheritance.
(4) Component approch: Put the common stuff in a component and have to
specialized pages use this component.
It's approach with good reusability.
--
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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org