1.1 --- a/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/PageController.java Mon Jan 21 13:43:40 2013 +0100
1.2 +++ b/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/PageController.java Mon Jan 21 15:57:30 2013 +0100
1.3 @@ -46,8 +46,11 @@
1.4 private static final TestPage PAGE = new TestPage();
1.5
1.6 @On(event = CLICK, id="pg.button")
1.7 - static void updateTitle() {
1.8 - PAGE.PG_TITLE.setText("You want this window to be named " + PAGE.PG_TEXT.getValue());
1.9 + static void updateTitle(TestPage ref) {
1.10 + if (PAGE != ref) {
1.11 + throw new IllegalStateException("Both references should be the same. " + ref + " != " + PAGE);
1.12 + }
1.13 + ref.PG_TITLE.setText("You want this window to be named " + ref.PG_TEXT.getValue());
1.14 }
1.15
1.16 @On(event = CLICK, id={ "pg.title", "pg.text" })