Maybe we need <tiles:insertDefintion> and <tiles:insertAttribute> to
handle the 2 types specifically instead of one <tiles:insert> to
handle them generically.
I don't know. Having used Tiles for a while, I'm used to the way
things are. It doesn't bother me to use the same overloaded tag in
two different ways. I'm not sure if it's confusing to the users or
not. I guess if the logic is already split up by if statements it
makes sense to just move it into separate classes with their own
name. The only issue is that right now I can use <tiles:insert> to
generically include a named fragment. The fragment could be an
attribute of the "current" definition or it could be a completely
independent definition.
Part of the problem is with the definition of a tile. Right now a
"tile" can be any of three things, pretty much handled generically by
the <tiles:insert> tag. Those three things are:
* A JSP page.
* An attribute of the current Tiles definition.
* Another Tiles definition.
Maybe we need to call the definition a "tile", an attribute an
attribute, and a page a page. OTOH, maybe it's good practice to keep
the ambiguity and call everything a tile. I can see benefits and
drawbacks to both approaches. Keeping it generic gives Tiles a lot
of flexibility. Requiring more specificity makes it easier for
newbies to get used to. Could/Should we do both (i.e an <insert> tag
for generic inserts and <insertDefintion>, <insertAttribute>, and
<insertPage> tags for specificity)?
Greg
On Oct 6, 2006, at 2:35 AM, Antonio Petrelli wrote:
Re-Re-Hi again
I know I am bugging you again but I have another idea.
Personally I don't like using the same <tiles:insert> tag to define
attributes in a layout page and to insert templates/definitions/
strings: I think the concept of attribute is separated from the
rest (it is somewhat like specified a "setXXX" statement in a Java
Bean).
Moreover if you take a look at InsertTag, attribute handling code
is almost separated (except of a set of "if-else if" statements)
from definition and template handling.
I think that a <tiles:attribute> tag could be created: I think that
this way the code of InsertTag (and the future AttributeTag) will
be much simpler, and the resulting application code will be more
intuitive.
What do you think?
Ciao
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]