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

UI Element Visibility ...

Hello Friends,

I am facing a strange problem, actually I have a lable and input filed, both have visibilits property as context element ( Visibility.addressfield ). The Context node Visibility is also avaiable in 2nd view via controller ( so its mapped node i.e. Visibility is mapped node). So far things works fine i.e from 1st view where actually the lable and input field is, I can regulate the visiblity in the 2nd view. And after some processing when I come back in 1st view and try to set the visiblity.none its not working..... the UI element are still visible in first view, I tried following to make it none.

wdThis.wdGetPOEntryCompController().wdGetContext().currentVisibilityElement().setAddressField(WDVisibility.NONE);
OR tried like this as well

wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE);

Buth both ways, in debug it shows me the visiblity none, but the element are still visible ..... any idea how I can fix it ??

Thanks and regards,

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2008 at 06:12 AM

    Hi,

    take a context attribute say, 'visible' in context and change its type to Visiblity.

    Local Dictionary, UIelement definitions,Visibility.

    Then bind the visible property of (in properties) your lable and input filed to this context attribute.u can have a button, and an action for it and the in that action u set the visibility of the context attribute 'visible to NONE.

    let me know if u need more clarity.

    Regards,

    Satya.

    Edited by: Satya on Aug 1, 2008 8:24 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 01, 2008 at 06:46 AM

    Hi Shah,

    Where you are writing this code?

    if you didnt do it, do as satya said, and write your code ( code to make visibility none) in the back button in second iview (view2). i.e. onAction method of a button by clicking which you are coming back to view 1.

    PradeeP

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member pradeep bondla

      There is no need to validate / invalidate that node. When it is given 1:1 cardinalities, its attributes can be used as if they would be on root-level and the node element is always there and the lead selection is always set.

      Armin

  • Posted on Aug 01, 2008 at 07:16 AM

    Hi,

    1. Make sure you are not invalidating the VisibilityElement(), while coming back from the 2 nd view.

    2. Are you doing this

    wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE); inside if(firstTime) in wdDoModify??? if yes then do it out side if(firatRime).

    If none of the above cases is true, then

    do one thing,

    inside your first view you will have an inbound plug from view2 to view1. there you include the above part.

    i.e.,

    wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE);

    Regards,

    Srinivas.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2008 at 07:26 AM

    That sounds strange. Please check again

    - if node "Visibility" has cardinality 1:1, selection 1:1

    - mapping of node "Visibility" is correct from both views

    - lifetime of views

    - all code positions the attribute values for the visibility are changed

    - data binding of "visible" property for Label and InputField

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.