atom feed23 messages in org.apache.wicket.usersQuestion re: style and variation
FromSent OnAttachments
Ned CollyerMar 2, 2009 8:57 pm 
Igor VaynbergMar 2, 2009 9:53 pm 
Ned CollyerMar 2, 2009 11:29 pm 
Igor VaynbergMar 3, 2009 8:12 am 
Ned CollyerMar 3, 2009 2:57 pm 
Jeremy ThomersonMar 3, 2009 4:16 pm 
jWeekendMar 3, 2009 7:17 pm 
Igor VaynbergMar 3, 2009 8:28 pm 
jWeekendMar 3, 2009 8:44 pm 
Igor VaynbergMar 3, 2009 8:46 pm 
Anton VeretennikovMar 3, 2009 8:48 pm 
Igor VaynbergMar 3, 2009 8:52 pm 
Anton VeretennikovMar 3, 2009 8:54 pm 
Igor VaynbergMar 3, 2009 8:56 pm 
Anton VeretennikovMar 3, 2009 8:58 pm 
Igor VaynbergMar 3, 2009 9:00 pm 
Anton VeretennikovMar 3, 2009 9:16 pm 
Brill PappinMar 4, 2009 6:32 am 
Brill PappinMar 4, 2009 6:58 am 
Brill PappinMar 4, 2009 7:00 am 
Igor VaynbergMar 4, 2009 8:46 am 
Brill PappinMar 4, 2009 1:20 pm 
Ned CollyerMar 4, 2009 3:10 pm 
Subject:Question re: style and variation
From:Ned Collyer (ned.@gmail.com)
Date:Mar 2, 2009 8:57:07 pm
List:org.apache.wicket.users

Hi,

I have browsed/read the previous threads regarding this topic and read the wiki on styling and localisation - but its inconclusive as to how this should be tackled.

I have my app running on multiple domains.

Each domain - when you hit it, sets a style into the session - so they appear to be different apps.

So I can have something like

MyPanel_client1_en_AU.html

most of the time this will resolve to

MyPanel.html

Now, if I want to have a component implemented inside MyPanel, with its own variant, then I was hoping to do this:

MyComponent_myVariant.html

However - the lookup I get is MyComponent_myVariant_client1_en_AU.html ... MyComponent_myVariant_client1.html MyComponent.html

It treats "myVariant_client1" as a single style value.

Now - the wiki says that this is expected (see http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html) - it also says that the possibilities are "exponential" ;)

How would I achieve variants working in conjunction with style?

Seems the touchpoints would be writing my own ResourceNameIterator, and writing my own ResourceStreamLocator.

Surely there is a cleaner simpler way - It feels dirty having to add this functionality, and the existence of ResourceNameIterator and ResourceStreamLocator indicates that it has already been thought about a fair amount.