cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable the Input field based on the Button Click?

Former Member
0 Kudos

Scenario: When the user click on the button (ID:btnCtreateInvoice) the Input field should be Visible.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Pradeep,

Following is the procedure to be followed:

1. Go to the context tab in the view controller and create an attribute of type

WDVisibility.

2.Go to the layout tab - property of this input field select the property visible and set it to the created attribute.

3.Now in the action of the button write the following code:


wdContext.currentContextElement().set<newAttribute>(WDVisibilty.VISIBLE);

This will do the job for you.

Regards

Amit

Former Member
0 Kudos

Hi,

1)First create 1 attribute as visible and set properties TYPE =com.sap.ide.webdynpro.uielementdefinitions.Visibility

2)bind the visible attribute in input field VISIBLE propeties

write this code onActionButton

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

it will work....

former_member182374
Active Contributor
0 Kudos

Hi,

Cretae context value attribute of type ''com.sap.ide.webdynpro.uielementdefinitions.Visibility".

Bind it to the "visible" property of your input field.

in wdDoinit, set it to NONE:

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

In the button event handler set it to visible:

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

Regards,

Omri

Former Member
0 Kudos

Hi Pradeep,

Create a context variable(Say Visible) and assign type to com.sap.ide.webdynpro.uielementdefinitions.Visibility from the LocalDictionary->uielementdefinitions

In wdDoinit(), add

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

Then, inside button action,

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

Regards

Fahad Hamsa