Hi Geert,

I think I just answered part of my own question.  A 
'LocalizedResourceFactory' could be used with a getInstance(ds, Locale, 
Platform), and then that would be used within the element (versus 
setting it as a system wide ResourceFinder).

I'm still curious about the relative path that -- is that supported?

Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685



Joshua Hansen wrote:
> Hi Geert,
> 
>  > My thought was to move the contents of resources/templates down one
>  > additional directory, resulting in e.g.:
>  > resources/templates/en_US
>  >   admin
>  >   authentication
>  >   common
>  >   pub
>  > resources/templates/en_US_PDA
>  >   admin
>  >   authentication
>  >   common
>  >   pub
>  > resources/templates/fr
>  >  etc, etc, etc.
>  >
>  > I then created a MyElement to extend Element and hold the skin
>  > attribute, and altered the elements to include the skin in the call to
>  > getHtmlTemplate().  But the jumpstart templates include other
>  > templates, and I haven't yet found a way to make them relative to the
>  > main template location.
> 
> I'm not familiar enough with the path system in RIFE elements and 
> templates.  Could a custom resource finder solve this problem?  Can 
> templates use relative paths (i.e. "include ../common/blueprint")?
> 
> Josh
> -- 
> Joshua Hansen
> Up Bear Enterprises
> (541) 760-7685
> 
> 
> 
> Geert Bevin wrote:
>> Hi Dennis,
>>
>>> The intent of having a directory per skin is to put everything needed
>>> to create the UI in that skin in one place.  That's easy to explain to
>>> customers, and easy to support.  But it looks like making it work in
>>> RIFE means I need to find a different place than loading the element's
>>> template to identify to RIFE which directory to use.  Any suggestions?
>>
>> RIFE looks up templates by default by using the classpath, however it  
>> will try to use a prefix directory 'templates' in case it can't find  
>> the template name as-is. So the HTML template 'pub.home' will be  
>> looked up in the classpath as the resource 'pub/home.html'. If that  
>> isn't found, 'templates/pub/home.html' will be tried. So for the  
>> jumpstart, the 'resources' dir is part of the classpath. You can  
>> create any structure and include the root in the classpath.
>>
>> In your case, the easiest would probably be to override the  
>> getHtmlTemplate method of Element and prefix the name of the 
>> templates  with skin attribute value. This should allow you to have 
>> one directory  per skin.
>>
>> Also, the lookup of templates in the classpath is just a default  
>> behavior. You could write your own resourcefinder and really 
>> customize  resource handling completely: 
>> http://rifers.org/wiki/display/RIFE/Abstracted+resource+handling
>>
>> Hope this helps,
>>
>> Geert
>>
>> -- 
>> Geert Bevin
>> Terracotta - http://www.terracotta.org
>> Uwyn "Use what you need" - http://uwyn.com
>> RIFE Java application framework - http://rifers.org
>> Music and words - http://gbevin.com
>>
>>
>> >>
>>
>>
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to