cancel
Showing results for 
Search instead for 
Did you mean: 

status for the inout fields

Former Member
0 Kudos

hi

i want my input field to be shown as red or green

with respect to the flag set . and the flag i will get

it from the backend . and a particular input field

will become red or green .

how can this be achieved ?

Accepted Solutions (0)

Answers (1)

Answers (1)

nikhil_bose
Active Contributor
0 Kudos

I think it is not advisable to raise an exception to make the input field color changed.

you can try this code and let me know if this is not what you are looking for.

I suppose flag as boolean which can be used to represent the backend data.



    if(flag){
    	IPrivate<YourComponentName>View.I<DataNode>Element element = wdContext.current<DataNode>Element();
    	IWDAttributeInfo attrinfo = wdContext.node<DataNode>getNodeInfo().getAttribute("<AttributeBindedToInputField>");
    	wdComponentAPI.getMessageManager().reportInvalidContextAttributeException(
    		element, attrinfo, "", false);
    }

Actually this snippet of code will raise an invalid context exception.

nikhiL