Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CSS custom variant availability
CSS custom variant availability [message #708087] Tue, 02 August 2011 12:47 Go to next message
Eclipse UserFriend
Hi Rappers

RWT allows people to add a custom variant to a certain widget.
Widget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");

Is there also a possibility to check if a variant is available?
Something like 'CssCore.getStyle("aVariant") == null' ?


BR
Andreas
Re: CSS custom variant availability [message #708135 is a reply to message #708087] Tue, 02 August 2011 13:28 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andreas,
sure...
if( "aVariant".equals( Widget.getData( WidgetUtil.CUSTOM_VARIANT ) ) ) {
......
}
HTH,
Ivan

On 8/2/2011 3:47 PM, Andreas Hoegger wrote:
> Hi Rappers
>
> RWT allows people to add a custom variant to a certain widget.
> Widget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
>
> Is there also a possibility to check if a variant is available?
> Something like 'CssCore.getStyle("aVariant") == null' ?
>
>
> BR
> Andreas
Re: CSS custom variant availability [message #708136 is a reply to message #708087] Tue, 02 August 2011 13:28 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andreas,
sure...
if( "aVariant".equals( Widget.getData( WidgetUtil.CUSTOM_VARIANT ) ) ) {
......
}
HTH,
Ivan

On 8/2/2011 3:47 PM, Andreas Hoegger wrote:
> Hi Rappers
>
> RWT allows people to add a custom variant to a certain widget.
> Widget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
>
> Is there also a possibility to check if a variant is available?
> Something like 'CssCore.getStyle("aVariant") == null' ?
>
>
> BR
> Andreas
Re: CSS custom variant availability [message #708172 is a reply to message #708135] Tue, 02 August 2011 14:30 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Ivan.. but that's not what I mean;)
The question is whether or not a certain variant is somewhere in the
"css hierarchy" defined.

e.g.
if(CssCore.getStyle("aVariant") != null) {
myWidget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
} else {
myWidget.setData(WidgetUtil.CUSTOM_VARIANT, "anOtherVariant");
}


/Andreas


On 02.08.2011 15:28, Ivan Furnadjiev wrote:
> Hi Andreas,
> sure...
> if( "aVariant".equals( Widget.getData( WidgetUtil.CUSTOM_VARIANT ) ) ) {
> .....
> }
> HTH,
> Ivan
>
> On 8/2/2011 3:47 PM, Andreas Hoegger wrote:
>> Hi Rappers
>>
>> RWT allows people to add a custom variant to a certain widget.
>> Widget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
>>
>> Is there also a possibility to check if a variant is available?
>> Something like 'CssCore.getStyle("aVariant") == null' ?
>>
>>
>> BR
>> Andreas
Re: CSS custom variant availability [message #708204 is a reply to message #708172] Tue, 02 August 2011 14:56 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Andreas,
unfortunately I'm not aware of any way to query if specific custom
variant is defined in the current theme for particular widget or not.
Just out of curiosity, what is the use case that requires this
functionality?
Best,
Ivan

On 8/2/2011 5:30 PM, Andreas Hoegger wrote:
> Thank you Ivan.. but that's not what I mean;)
> The question is whether or not a certain variant is somewhere in the
> "css hierarchy" defined.
>
> e.g.
> if(CssCore.getStyle("aVariant") != null) {
> myWidget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
> } else {
> myWidget.setData(WidgetUtil.CUSTOM_VARIANT, "anOtherVariant");
> }
>
>
> /Andreas
>
>
> On 02.08.2011 15:28, Ivan Furnadjiev wrote:
>> Hi Andreas,
>> sure...
>> if( "aVariant".equals( Widget.getData( WidgetUtil.CUSTOM_VARIANT ) ) ) {
>> .....
>> }
>> HTH,
>> Ivan
>>
>> On 8/2/2011 3:47 PM, Andreas Hoegger wrote:
>>> Hi Rappers
>>>
>>> RWT allows people to add a custom variant to a certain widget.
>>> Widget.setData(WidgetUtil.CUSTOM_VARIANT, "aVariant");
>>>
>>> Is there also a possibility to check if a variant is available?
>>> Something like 'CssCore.getStyle("aVariant") == null' ?
>>>
>>>
>>> BR
>>> Andreas
>
Previous Topic:Which qooxdoo Simulator version to use for UI test?
Next Topic:RAP JUnit Tests Ignore RAP Target Platform (Win only)
Goto Forum:
  


Current Time: Fri Apr 26 12:26:20 GMT 2024

Powered by FUDForum. Page generated in 0.02718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top