Joe Germuska wrote:
It still seems kind of verbose. How do people feel about using JSTL
functions? I personally have really found them a good element in the
toolkit, but I haven't seen many open source projects include them
alongside
custom tags.
I think this below is mich nicer:
<tiles:insertTemplate template="${tiles:attribute(head)}" ignore="true" />
The problem with this is that it functions have to be defined as static
methods, so the above wouldn't work directly; it would have to be something
more like
<tiles:insertTemplate template="${tiles:attribute(pageContext, head)}"
ignore="true" />
so that the static method could look up the ComponentContext.
I agree that we need to work on simplifying the tags, but I'm not sure
whether or not functions are the way to go. Functions to me are more
utilities, and the fact that they're more complex, as you pointed out,
to use for anything more than that makes me think that we'd be choosing
the wrong tool for the job. I'd like to keep the tags as easy as
possible for the end user to understand, they shouldn't need to wory
about the pageContext unless they're embeding tiles into another
framework or doing something more than the typical.
Couldn't we just improve our tags; add additional ones, simplify the
ones we have, etc. . .?
Does anyone think this is even worth pursuing? It would be kind of nice if
the static TilesFunctions class could get a hold of a ThreadLocal or
something, but if Tiles is to be stand alone, I'm not sure I can think of
any reliable way to initialize a ThreadLocal before the functions might be
called.
Yes, I think it's worth pursuing a solution to the "verbose" problem.
I'm just not convinced on the solution being functions (but I'm not
against it necessarily either).
-D
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]