cancel
Showing results for 
Search instead for 
Did you mean: 

Set State to required Dynamically

Former Member
0 Kudos

Hi,

I need to set the State property of my Ip box to required at runtime.

I have bound it to an attribute of type state but when I try to set the value, no option for Normal or Required is shown.

wdContext.currentContextElement().setCustNameMandatory(no option shown here);

Pls Help

TIA

Himanshu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Bind property "state" to a context attribute of DDIC type "State" and change the context attribute value as needed.

Armin

siddharth_jain
Active Contributor
0 Kudos

Hi ,

You can achieve this in wdDoModify Method of a view.

for getting the input box object :--

IWDInputBox ip = (IWDInputBox)view.getElement("<Input Box Id");

When you will get instance of input box element you can set its state at runtime like this:

ip.setState(WDState.REQUIRED)//Some thing like this.

Hope This Help.

Regards,

Siddharth

Former Member
0 Kudos

Hi

use

IWDInputField input;// Your input field object

input.setState(WDState value);

Ex:

input.setState( WDState.REQUIRED);

Apihttp://help.sap.com/javadocs/NW04s/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/WDState.html

Regards

Ayyapparaj

Former Member
0 Kudos

Thanks a lot......my prob is solved