How about just global="true" unless we can find a use case that makes line
vs body necessary?

On 7/31/06, Andreas Andreou <[EMAIL PROTECTED]> wrote:

Script 1:
<unique>
dojo.require('tapestry.*');
</unique>

Script 2:
<unique>
dojo.require('tapestry.*');
dojo.require('tapestry.form.*');
</unique>

Script 3:
<unique>
dojo.require('tapestry.*');
dojo.require('tapestry.form.*');
</unique>

As is, we'll get all 5 lines.
With global:line we'll get only 2 lines
With global:body we'll get 3 lines, from 1 and 2 because the body of 2 is
the same with 3.

As i said, global:line is the nice stuff here...
I don't have a use case for global:body, it's just in there for
completeness.
And actually, another thought was simply
<unique perLineAndGlobal="true">
I'd prefer this one if i could find a better name for the attribute


Jesse Kuhnert wrote:
> I think I generally like the idea.
>
> Could you give an example of how global:line/global:body would be
> different?
>
>
> On 7/31/06, Andreas Andreou <[EMAIL PROTECTED]> wrote:
>>
>> With all those dojo.require that are now included in pages,
>> I feel it would be nice to make them appear only once.
>>
>> The unique tag works in a per component style.
>> Hacking it a bit reduces 14-17 lines of requires
>> (in the TimeTracker example) to just 6-7
>>
>> The next step is to add a strategy attribute to unique
>> Possible values would be:
>> component (the default, works as normal)
>> global:body (the whole body included just once - if other scripts try
>> to include the same body nothing will happen)
>> global:line (each line is trimmed and included - if other scripts try
>> to include an already included line, nothing happens)
>>
>> I'm mainly interested in global:line of course...
>> So, any thoughts? Do you feel it's an overkill?
>>
>>
>> ---------------------------------------------------------------------
>> 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]




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to