You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by Oleg Gorobets <ol...@gmail.com> on 2008/10/01 18:32:29 UTC

Attribute names in tiles 2.1

Hello all,

I've noticed that in new tiles 2.1 name is deprecated in Attribute 
class. I'm trying to figure out the reasons why this decision was made..

We are constructing a portal solution based on tiles and probably many 
other developers do the same thing. The key point here is being able to 
handle attribute rendering and track their names (which currently serve 
like window ids for portlets). I really appreciate adding attribute 
renderers in 2.1 however I think that attribute renderer should be aware 
of all attribute features. I guess the logic here should be the 
following: the "renderer" should know everything of the object it 
renders. What do you think about this? If you have other points on this 
please let me know.

Sincerely,
Oleg Gorobets

Re: Attribute names in tiles 2.1

Posted by Antonio Petrelli <an...@gmail.com>.
2008/10/1 Oleg Gorobets <ol...@gmail.com>:
> I've noticed that in new tiles 2.1 name is deprecated in Attribute class.
> I'm trying to figure out the reasons why this decision was made..

Simply because the name of an attribute is not of the attribute, but
of the template.
In fact, the name was used only to transfer it to a map into a
Definition, so it was pretty useless to the attribute itself.

> We are constructing a portal solution based on tiles and probably many other
> developers do the same thing. The key point here is being able to handle
> attribute rendering and track their names (which currently serve like window
> ids for portlets).

Isn't the "value" of the attribute enough for the rendering?
The name is only a "placeholder" that it is used to let the template
and the definition "communicate", putting the right attribute in the
right place in the template.

Antonio