Re: Question re: style and variation

2009-03-04 Thread Ned Collyer
What I'm trying to do at the moment (and the purpose of starting this thread) is creating custom form fields, that have different types of HTML depending on the variant. So I could do new LabelledTextField("banana") { public String getVariation() { return "complex"; } } new LabelledTex

Re: Question re: style and variation

2009-03-04 Thread Brill Pappin
For my own edification, I missed the thread on "style". what exactly is the "style" that is different from the variation? I guess for Locale, it *does* use the double underscores when you have a placeholder as in the case of a country only. I think its a familiar model and using it for another

Re: Question re: style and variation

2009-03-04 Thread Igor Vaynberg
the problem is when you have MyFile_foo_en_CA.html is foo the style or the variation? you can have one without the other, or both. -igor On Wed, Mar 4, 2009 at 6:58 AM, Brill Pappin wrote: > I agree that it should stick to convention for the locale and it would be > nice if the rest of the form

Re: Question re: style and variation

2009-03-04 Thread Brill Pappin
I think we have to be very careful about using special chars in the file name. Depending on the operating system you could have a real problem even doing this at all. I have not done any research into what you can use in a file name, but this file has to be usable on just about anything.

Re: Question re: style and variation

2009-03-04 Thread Brill Pappin
I agree that it should stick to convention for the locale and it would be nice if the rest of the format was consistent. I wave to wonder though, if we really need a new format for the Wicket variation. Its all about search order, and there is no need to alternative separator chars our doub

Re: Question re: style and variation

2009-03-04 Thread Brill Pappin
I like the brackets for clarity, but wouldn't that cause some filesystems to have trouble with the files? - Brill On 3-Mar-09, at 5:57 PM, Ned Collyer wrote: IMO, the brackets approach works because it clearly separates each of the sections. It is a bit ugly, but its still simple. Can'

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
Only if someone needs to implement other file name policy and at the same time don't want to copy & paste. My mite only: this is encapsulating AND flexible but...difficult to code. On Wed, Mar 4, 2009 at 12:01 PM, Igor Vaynberg wrote: > for every panel, textfield, label, tabbedpanel, etc, etc, et

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
for every panel, textfield, label, tabbedpanel, etc, etc, etc? -igor On Tue, Mar 3, 2009 at 8:58 PM, Anton Veretennikov wrote: > extend common base component? > > On Wed, Mar 4, 2009 at 11:56 AM, Igor Vaynberg > wrote: >> that would be extremely tedious if you want to override it for all >> co

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
extend common base component? On Wed, Mar 4, 2009 at 11:56 AM, Igor Vaynberg wrote: > that would be extremely tedious if you want to override it for all > components in your application :) > > -igor > > On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov > wrote: >> per each component? >> >> On W

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
that would be extremely tedious if you want to override it for all components in your application :) -igor On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov wrote: > per each component? > > On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg > wrote: >> we cannot make this overridable because it b

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
per each component? On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg wrote: > we cannot make this overridable because it breaks encapsulation. > > imagine you write a table component that includes styles and > variations. i then want to use it in my app where i have overwritten > this syntax, now m

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
we cannot make this overridable because it breaks encapsulation. imagine you write a table component that includes styles and variations. i then want to use it in my app where i have overwritten this syntax, now my app wont pick up your styles and variations. so we need to come up with something

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
String getFileNameTemplate() { return "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]"; } On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg wrote: > but there is a special rule about the _ prefix to indicate a > variation, where as a simple empty bracket is easy

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
but there is a special rule about the _ prefix to indicate a variation, where as a simple empty bracket is easy - its always consistent [style][variation][locale]. just my two cents. personally i never had to use variations myself, but there were threads in the past about them, so i guess someone

Re: Question re: style and variation

2009-03-03 Thread jWeekend
Igor, I'd say your "HomePage[style_variation]_US_en.html that way a style only version can be HomePage[style]_US_en.html and variation only would be HomePage[_variation]_US_en.html we can then forbid the use of _ in style and variation names. " is the best option (so far). There are no special

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
i dont like the fact that there is now a -, (, ), and _ in the name i can live with something like HomePage()(variation)_US_en.html vs HomePage()(variation)(US_en) maybe even simpler would be do HomePage[style_variation]_US_en.html that way a style only version can be HomePage[style]_US_en.htm

Re: Question re: style and variation

2009-03-03 Thread jWeekend
Igor, In Java, variant is the least significant component(s) of a locale: lang_COUNTRY_variant . Wicket adds style and variation (right?) so maybe only these components of the filename should have a special marker. That way, some level of consistentcy is maintained and the Wicket specific styl

Re: Question re: style and variation

2009-03-03 Thread Jeremy Thomerson
what if you prepend a letter for what it is? something like: mypanel_s_style_v_variant_l_locale.html - or something like that? so that it doesn't matter what order they're in? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 3, 2009 at 4:57 PM, Ned Collyer wrote: > > IMO, the

Re: Question re: style and variation

2009-03-03 Thread Ned Collyer
IMO, the brackets approach works because it clearly separates each of the sections. It is a bit ugly, but its still simple. Can't please everyone all of the time, but we can try to give the clients the right stuff, and the devs the power to build it :). yeah, not to mention it might get quiet

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure lo

Re: Question re: style and variation

2009-03-02 Thread Ned Collyer
Yep :). I at least 1 thought on this matter. Currently, I have a "webapp" module - which will have my components in it, and my components variants. I have pushed all i18n into properties files - which is working thus far. I allow the clients to customise their HTML from another folder - ie, so

Re: Question re: style and variation

2009-03-02 Thread Igor Vaynberg
the problem is, if you have MyPanel_foo.html, is foo the style, the variation, or the locale? perhaps we can identify the parts differently...needs some thinking. -igor On Mon, Mar 2, 2009 at 8:57 PM, Ned Collyer wrote: > > Hi, > > I have browsed/read the previous threads regarding this topic a

Question re: style and variation

2009-03-02 Thread Ned Collyer
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