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

Basic UIElements visibility.

Hi Experts,

Can any body please help me

I need to generate Uielements dynamically on clicking of a button.

I.E., on clicking on a create button i need to display two input fields and two text fields.

For that i have created two input fields and text fields in a view and set its visibility property to blank. on clicking on the button i am trying to set its visibility property to visible . But i failed to do this one.

Can anybody please help me

whether is it right way or can we do this in any other way.

Thanks and Regards,

Shashi.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 09:33 AM

    Hi ,

    You are doing it in Correct way.

    Create a Value Attribute and change it's value to com.sap.ide.webdynpro.uielementdefinitions.Visibility

    Intially

    wdContext.currentContextElement().set<visibility attr>(WDVisibility.BLANK);

    On Action method

    wdContext.currentContextElement().setRftsdg(WDVisibility.VISIBLE);

    Regards,

    Sunitha Hari

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 09:33 AM

    Hi Shashi,

    Create one context attribute, say Att1. Set it's data type as type com.sap.ide.webdynpro.uielementdefinitions.Visibility.

    Now bind visible property of UI elements you want to make visible with with attribute (att1).

    In wdInit write follwoing code:

    wdContext.currentContextElement.setAtt1(WDVisibility.BLANK);

    In button action write following code:

    wdContext.currentContextElement.setAtt1(WDVisibility.VISIBLE);

    Regards,

    Gopal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 09:34 AM

    Hi,

    create a context attribute of type >dictionalries >com.sap.ide.webdynpro.uielementdefinitions-->visisbility

    and set it to visible in the onaction method of the button

    and set context attribute to all the remainig uielements visibilty property

    Thanks&regards,

    ramani.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 09:36 AM

    Hi Shashi,

    Create the UI Elements in design time and set the visibility property in run time. For this do like this:

    Create a context variable (say visible) of type com.sap.ide.webdynpro.uielementdefinitions.Visibility. Bind this to the UI Elements that you want to hide/display.

    If you want to hide them do like this

    wdContext.currentContextElement().setVisible(WDVisibility.NONE);

    If you want to display them do like this

    wdContext.currentContextElement().setVisible(WDVisibility.VISIBLE);

    regards,

    Siva

    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.