on 10-15-2008 7:56 PM
Hi All,
I have a dropdown with 15 states are listed and those are coming from the backend while executing the RFC. I have 5 states hard coded and check if this retrived dropdown state is equals to hard coded state value with AP,MH,UP,MP,MO. if the retriedved value matches hard coded state value then i have to fire an event, if not then no event required.
I will get the currrnt state as:
String stateValue = wdContext.currentContextElement.getState();
stateValue.equals()............................?
this retrived state value needs to comapre with hard coded 5 states say exampel: AP,MH,UP,MP,MO. if any one matches i have to raise an event or else not.
Please advice
Peter.
Hi,
Use the below mentioned code:
String strStates []={"AP","MH","UP","MP","MO"};
for (int i=0;i<strStates.length();i++){
if(stateValue.equalsIgnoreCase(strStates<i>)&&! stateValue.equalsgnoreCase(retrievedValue)))
{
// fire an event
}
}
Hope this helps you.If not please throw some more light on second requirement.
regards,
amit bagati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if(stateValue.equals("AP") || stateValue.equals("MH") || stateValue.equals("UP") || stateValue.equals("MP") || stateValue.equals("MO"))
{
// fire an event.
}
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick reply.
I forgot to mention this. Say if the retrived value is CH and if the user changed to again CH(not required to do select the same stae again but some time users do) and when the click on save that time also should not fire an event. This CH is not listed in hard coded states.
Thanks
Peter
Hi Peter,
I am a bit confused with your requirement:
Did you mean that if the user intially selected CH and then clicked on it again to deselect it? If yes, then when you loop through the node to find the multiselected value for that index it won't be set as it was deselected. If your requirement is different then let me know.
Regards,
Murtuza
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.