Antonio Petrelli wrote:
On 1/16/07, Joe Germuska <[EMAIL PROTECTED]> wrote:
If I use "<tiles:insertAttribute name="foo" /> and Foo was defined as a
string, the end result is a visible string in the page. I have trouble
perceiving that as a definition, while it naturally fits my concept of
"insert."
What do you mean? An attribute can be anything (string, name of a
definition, etc.), eventually it depends on the "type" attribute.
Right, but the point of the tag is to take the string representation of
that value (no matter how that value is determined) and INSERT it onto
the page. To me, it only makes sense to indicate that in the tag name.
Perhaps your concern is that there might be some indeterminacy between
whether any given attribute value might refer to a specific definition
or is
actually intended as a mere string value. I'm open to the position that
this is unnecessarily confusing, although my current feeling is that
that's
not such a serious problem.
With "confusion" i meant that the "tiles:insertAttribute" tag could be
used as you use insertDefinition and insertTemplate, but they are not
the same! Attributes are the core of the whole Tiles, they define the
"holes" to fill with values. Templates are pages with attributes, and
definitions are templates with filled attributes.
The definition and template are definately specific types of entities
and inserting them directly is not as dynamic as inserting an attribute.
I agree with that. But in my estimation, the tag (also called an
action), should be named by what it DOES not what it operates on.
I think I hear you saying that by naming the tag insertAtttribute,
people would start to think of attributes in the same way they think of
definitions and templates (named, more static), and you would prefer
something like:
<tiles:insertDefinition=""/>
<tiles:insertTemplate=""/>
<tiles:insert attribute=""/>
Is that true? I'm not convinced and think this may be even more confusing.
David