Skip to Content
author's profile photo Former Member
Former Member

Binding UI property visibilty to context attributes

I have a radiobuttongroupbykey with a onSelect event that when triggered checks the value of the radio group and if the value doesn't equal "xxx" a drop down list's visibility property is changed to none (by wdthis.wdgetcontext().currentContextElement().set<myAttribute>(wdvisibility.none); This attribute has a Visibility type and is bound to the visibility property of my drop down list )

The "if" statement works just fine. I have no problem hiding the drop down list. The problem is when I select the radio button that <u>equals</u> "xxx" and I change the drop down list's visibility to VISIBLE it does not show back up.

Any help/suggestions appreciated. Thank you!

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 02:02 AM

    Hi,

    First check the if statement equals to 'xxx' is satisfy or not. Using debug mode you can check.If you hide dropdown means binding is correct. So like this you show dropdown also possible. I think the condition is not met. Check your all code to set dropdown visibility.

    Kind Regards,

    S.Saravanan.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 04:56 AM

    Hi Victor,

    Check whether you are accidentally setting the visible attribute property to none after you have set the visible attribute property to visible.

    i.e.

    .
    .
    .
    wdthis.wdgetcontext().currentContextElement().set<myAttribute>(wdvisibility.visible); 
    .
    .
    .
    wdthis.wdgetcontext().currentContextElement().set<myAttribute>(wdvisibility.none); 
    .
    .
    .
    .

    Hope it helps you.

    Regards,

    Maheswaran.B

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 04:59 AM

    Hi,

    Try to use .equals("") method to compare strings.

    example:

    String a="hi";

    if(a.equals("a")){

    }

    Regards,

    Vijayakhanna Raman

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 09:59 AM

    Without seeing your code, this is difficult to answer.

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 04:00 PM

    if (wdContext.currentContextElement().getCategories().toString().equals("ProductsAndServices"))

    wdThis.wdGetContext().currentContextElement().setIndustryVisibility(WDVisibility.VISIBLE);

    else

    wdThis.wdGetContext().currentContextElement().setIndustryVisibility(WDVisibility.NONE);

    I still do not know what caused this to work, but it is working now. Thank you.

    Add comment
    10|10000 characters needed characters exceeded