tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric B <ebe...@hotmail.com>
Subject Re: Cascading preference when a view name matches several templates
Date Tue, 05 Nov 2013 19:40:51 GMT
On 13-11-03 11:09 AM, Mick Semb Wever wrote:
> ClamAV 0.96.5
> On Tue, 2013-10-29 at 11:45 -0400, Eric B wrote:
>> How does tiles know which definition to use?  Is there a precedence
>> order?  Is it based on the order in which the tile*.xml files are
>> registered/loaded?
> Without double-checking the code my memory from experience tells me that
> the first definition found (as files are loaded and as found in the
> file) is the definition that is used.

That sounds similar to what I remember reading in the code, and is understandable, but I would
have loved to have a feature that uses "closest match" 
algorithm as opposed to a "first-defn found".

For example:
defn= "REGEXP: ^some.+\.jsp"

I realize that this opens a quagmire of how to determine which is the closest match (ex: is
REGEXP: ^some.+\.jsp" a closer match than WILDCARD: 
some*.jsp).  In which case, maybe a weighting or priority option, such that if I have one
regex that is more explicit, to use it before using one that 
is less explicit.  If I remember correctly, non-pattern based expressions are checked first,
but otherwise, it is somewhat pseudo-random order.

I'm surprised that no-one has seen the need for something like this before.



View raw message