google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

gwt-test-util throws exception when Ui field is undeclared but used in UiHandler annotation. #150

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Create a UiBinder XML (MyTestView.XML) and add any widget (Say an Anchor).
2.  Add an event using UiHandler annotation in UiBinder implementation(Say 
MyTestViewImpl.java) as 
@UiHandler("logoutLink")
void onLogoutImgClick(ClickEvent event) {
    Window.open("../logout.jsp", "_self", "");      
}
But don't declare "logoutLink" as an Anchor (i,e. "UiField Anchor logoutLink" 
is not declared in the impl class).
3.  Run the test case on MyTestViewImpl.java. gwt-test-util throws exception 
related to event attached to an unknown UiField.  Right now I have declared 
Anchor as "UiField Anchor logoutLink;" in impl class as a workaround and 
continued my testing.

What is the expected output? What do you see instead?
I felt declaring a UiField in implementation class just to use it in UiHandler 
and for nothing else is a bit overkill.

What version of the product are you using? On what operating system?
.39

Please provide any additional information below.
It may or may not be a bug.  I am not sure.  As the workaround is very quick 
one and if it is not a bug, please go ahead and close this issue.

Thanks
Shivakumar

Original issue reported on code.google.com by shivakum...@gmail.com on 20 Jul 2012 at 7:24

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 23 Jul 2012 at 9:23