on 01-11-2012 7:43 AM
HI All,
How to hide UI Element(input field),while selecting item from drop down UI element.
Thanks
Dear Vagdevimallaaa
Play with WDVisibility in you WD Code based on your requirement and drop down UI element to make input field visible or none.
Best Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are numerous threads regarding this, have you already searched the forum?
Anyway, 1) Bind the 'visible' property of both the label and the input field to a context attribute of type com.sap.ide.webdynpro.uielementdefinitions.Visibility
2) In the event handler of the onSelect of your dropdown, evaluate the value of your dropdown. Based on the selection, set the context attribute to either WDVisibility.VISIBLE or WDVisibility.NONE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please look this code
1.Create one Droupdownkey UI element in your firstView (Droupdown is bind to the one value attribute i.e MonthName)along this u can take 2 lable. For 2 lables you can set Visibility (com.sap.ide.webdynpro.uielementdefinitions.Visibility) property.
2. in wdintint method you can write this code
ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("MonthName");
IModifiableSimpleValueSet values =myType.getSVServices().getModifiableSimpleValueSet();
values.put("123","123");
values.put("XYZ","XYZ");
wdContext.currentContextElement().setMonthName("123");
wdContext.currentContextElement().setXYZ(WDVisibility.NONE);
wdContext.currentContextElement().set123(WDVisibility.NONE);
3.in Droupdownby key having OnSelect event in that place you can create on method. Under method you can write this code.
String firstName = wdContext.currentContextElement().getMonthName();
wdComponentAPI.getMessageManager().reportSuccess("First Name:"+firstName);
String lastName = wdContext.currentContextElement().getMonthName();
wdComponentAPI.getMessageManager().reportSuccess("Last Name:"+lastName);
if(firstName.equalsIgnoreCase("123"))
{
wdContext.currentContextElement().setXYZ(WDVisibility.VISIBLE);
wdContext.currentContextElement().set123(WDVisibility.NONE);
}
else
{
wdContext.currentContextElement().set123(WDVisibility.VISIBLE);
wdContext.currentContextElement().setXYZ(WDVisibility.NONE);
}
Hope this helps!!
Best Regards
Vijay K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.