Yes, I have tried that already but the issue with my scenario is that when I set the Id for any widget, I want to set with some dynamic value rather than just any other Id. And GWT is not allowing me to make use of the reflection API; ccan you please tell me whether GWT allows the usage of Reflection API or not?
As you can see, the construction of the entire section is happening inside a for-loop, hence, it is all dynamic. Now, if I just say getText(), I doubt if it'll work out. Can you please provide me some alternate solution to this?
You have posted a huge code thats irrelevant to your actual question.
Here is what i see:
Well my friend, this is not GWT issue, But it's rather a Java 'issue'. Your code logic is to reuse a field variable to point to another object
So Its obvious that you have lost its reference. (Or in simple words, 'txt' will point to the LAST textbox in the loop)
Considering that you are adding some kind of panel on the fly ... you can consider an approach like:
I hope I have solved / correctly understood your problem