Exactly, 

the message was only to point out that changes like these make library
writer's life hard in the long run. So I was only questioning the rationale
behind the change in no-slashes-in-virtual-folders and how it auto
contributes the associated contribution to ClasspathAssetAliasManager.

In my opinion that auto contribution should be removed.

The missing RegexAuthorizer is quite a wall to climb for me. Perhaps I need
to contribute my own implementation of AssetPathAuthorizer? Anyone?

 - Ville


jc1001 wrote:
> 
> It would appear that even with this code to check the version number,
> without a T5.2.0 equivalent for the RegexAuthorizer service to allow some
> variation on:
> 
> ("com/orientimport/.*\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif)|(html)|(ico)|(s
> wf)|(xml))$")
> 
> ... to grant access to resources the t5easyfckEditor won't work.  It's a
> pity no workaround seems to be available for this, unless I am missing
> something.
> 
> Regards,
> Jim.
> 
> -----Original Message-----
> From: Ville Virtanen [mailto:ville.virta...@cerion.fi] 
> Sent: 31 May 2010 18:00
> To: users@tapestry.apache.org
> Subject: Re: Asset protection and upgrade notes
> 
> 
> Also this choice forces us library writers to either
> 
> a) support two separate deployment jars for different T5 versions
> b) fork the code depending on the T5 version
> 
> So my approach is probably this:
>      public static void
> contributeClasspathAssetAliasManager(MappedConfiguration<String, String>
> configuration, 
>             @Inject @Symbol(FckEditorConstants.EDITOR_CONTEXT) String
> location,
>             @Inject @Symbol(SymbolConstants.TAPESTRY_VERSION) String
> t5Version)
>     {
>         if(!location.equalsIgnoreCase("easyfck") ||
> getTapestryVersion(t5Version) < 5106) {
>             configuration.add(location, "com/orientimport/easyfck/js");
>         }
>     }
> 
>     private static int getTapestryVersion(String version) {
>         return Integer.parseInt(version.replaceAll("\\.", ""));
>     }  
> 
> Not elegant, not good code (assumes something about the future version
> numbers..), not maintainable in long run, if these dicisions will keep
> popping up.
> 
> Also the automatic classpath asset addition works for this library only if
> the user who uses the library hasn't decided to use custom url for
> his/hers
> fck editor. It should not be depended on the TAG prefix?
> 
> My 2c,
> 
>  - Ville
> 
> 
> 
> 
> Ville Virtanen wrote:
>> 
>> Hi,
>> 
>> I've been tracking the documentation to understand the change in asset
>> protection, but haven't found anything useful.
>> 
>> I've checked the upgrade guide from svn (last update 4 days ago):
>>
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/upgrade.a
> pt?revision=948226&view=markup
>> 
>> But really it only mentions the no-slashes-in-virtual-folders
>> restriction.
>> Where is the asset protection part or am I looking from wrong sources?
>> 
>> Also, what is the rationale behind removing library specific versions?
>> Even if the 3rd party library doesn't change any resources browsers are
>> forced to download all assets again when updating the main program.
>> Technical challenges I presume?
>> 
>> Anyhow, the info on asset protection is very important for me, or at
>> least
>> just plain cold "We're working on it and have no eta.". (Then I know to
>> stop reading through sources.)
>> 
>>  - Ville
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28733093
> .html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28751736.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to