on 07-27-2005 2:42 PM
Hi all,
Have a doubt about DropDownByKey UI Element.
I have a DropDownByKey with information from a Simple Type from my Local Dictionary. I when I run my application, I have to compare the value that I select from my Dropdownbykey with another string... he code I'm using for this is..
String str1 =
(String) wdContext.currentContextElement.getcontext1();
String str2 =
(String) "Test";
if (str1 == str2) {
//do something
}
else {
//do something
}
So, the problem is...when I try to compare this two strings and I already know they are the same, the program also takes de else option and never goes throught the if condition.
Please, help me with this...
Thanks in advance,
Jesus
Jesus,
Just a wild Guess...! Are you using '==' to compare the strings. (It compares the objects). If so use .equals() or .equalsIgnoreCase().
If this is not the case, pls let me know. I'll send you the code for this.
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.