I´ve been working on some small projects using GWT MVP framework + GWT Editors framework. I have Views interfaces with fields declared like: @Path("field") IsEditor<ValueBoxEditor<Long>> getField();
Views implementations look like this: @UiField IsEditor<ValueBoxEditor<Long>> field; public IsEditor<ValueBoxEditor<Long>> getField(){ return field; } In my Activitys I have referances to correspond Views and when I have to do(in Activity) something like this: view.getField.setEnable(true); I have to do cast to ((ValueBoxBase<Long>) view.getField()).setEnable(true); After that I can't test this unit, because in my test I define behaviour of View to return Mock (IsEditor<ValueBoxEditor<Long>>) on view.getFiled() as result I get: java.lang.ClassCastException: com.google.gwt.editor.client.IsEditor$ $EnhancerByMockitoWithCGLIB$$e8c00c36 cannot be cast to com.google.gwt.user.client.ui.ValueBoxBase What is best practiece to call Views components methods from Activity without doing casting? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.