[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: What happens when Boootstrap 4 is released?
From:       "Thiago H de Paula Figueiredo" <thiagohp () gmail ! com>
Date:       2014-12-12 19:44:30
Message-ID: op.xqrs4glhovlrp5 () arsmachina
[Download RAW message or body]

On Fri, 12 Dec 2014 16:47:33 -0200, Bob Harner <bobharner@gmail.com> wrote:

> different HTML for *that* component. You don't need a separate
> TextField.tml template for Bootstrap 2, 3 and 4 unless the <input
> type="text"> tag needs to have different HTML rendered for each of
> those Bootstrap versions. Secondly, these templates would mostly be
> very small little things. For example, the TextField default template
> (TextField.tml) might be just this one line:
>
>     <input type="${type}" name="${controlName}" id="${clientId}"
> value="${value}" size="${width}" />
>
> and the TextField Bootstrap 3 template (bootstrap3/TextField.tml) would  
> be:
>
>     <input type="${type}" name="${controlName}" class="form-control"
> id="${clientId}" value="${value}" size="${width}" />
>
> The only difference there is the class="form-control" part.

Agreed, Bob. I don't see the need for templates for form field components,  
for example. A symbol or service (maybe working like  
ValidationDecorator.insideField()) for providing the CSS class to be used  
and poof!, you can make TextField, for example, to output whatever you  
want. The only components that would benefit from using templates would  
be, IMHO, the ones which actually generate more than one HTML element,  
specially the BeanModel-based ones: BeanEditor (which already has control  
over CSS classes through symbols), BeanEditForm, BeanDisplay, Grid.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic