cancel
Showing results for 
Search instead for 
Did you mean: 

coding simple type enumeration options, possible?

Former Member
0 Kudos

Hi, I made an DropBoxByKey and added to it via Simple Type couple options (option1, option2, option3). Now what I want to do is, in case of option choosed row of inputfields will appear.

So basicly, I made a context of the type of Visibility and binded it to TransparentContainer where those input fields are. In Init part of View implementation part I set it up to VISIBILITY.NONE, it went invisible as intended. Now, once option1 choosed from dropbox I want it to go VISIBILITY.VISIBLE. How can I do that? Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Assign an action "OptionSelected" to the "onSelect" event. Assuming that the "selectedKey" of the drop-down list is bound to attribute "Key" and the visibility of the container is bound to attribute "InputFieldsVisibility", implement the action handler like


onActionOptionSelected(...)
{
  String currentOption = wdContext.currentContextElement().getKey();
  wdContext.currentContextElement().setInputFieldsVisibility( "option1".equals(currentOption) ? WDVisibility.VISIBLE : WDVisibility.NONE );
}

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

1. Create one value attribute name inp_visible in your context and select its type to com.sap.ide.webdynpro.uielementdefinitions.Visibility

2. Bind this context to the visible property of the input field.

3. Create an action and bind it to the OnSelect action of your dropdown.

4. Write this line in your OnSelect method of the dropdown

wdContext.currentContextElement().setInp_visible(IWDVisisibility.VISIBLE);

Warm Regards,

Murtuza

Former Member
0 Kudos

thanks

former_member197348
Active Contributor
0 Kudos

Hi,

Create an action and bind it to onSelect event of DropDown.

You can set it VISIBILITY.VISIBLE in this action

Regards,

SIVA

Edited by: Siva Rama Krushna on Feb 14, 2008 7:33 PM